From 72afc8e31c9dcef58b1308eddd4d1dde489e4670 Mon Sep 17 00:00:00 2001 From: Frans Bongers Date: Sun, 15 Dec 2024 21:38:52 +0100 Subject: victory and defeat on front and end game on defeat --- data.ts | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'data.ts') diff --git a/data.ts b/data.ts index 1ab4a98..806c9b8 100644 --- a/data.ts +++ b/data.ts @@ -1,4 +1,4 @@ -import { Card, Effect, FactionId, Player, StaticData } from './types'; +import { Card, Effect, FactionId, FrontId, Player, StaticData } from './types'; const LIBERTY = 0; const COLLECTIVIZATION = 1; @@ -22,6 +22,7 @@ const NORTHERN = 'n'; const SOUTHERN = 's'; const CLOSEST_TO_DEFEAT = 'd'; const CLOSEST_TO_VICTORY = 'v'; +const FRONTS: FrontId[] = [ARAGON, MADRID, NORTHERN, SOUTHERN]; const TOWARDS_CENTER = 10; const AWAY_FROM_CENTER = 11; @@ -39,7 +40,23 @@ const ANARCHIST = 'Anarchist' as Player; const COMMUNIST = 'Communist' as Player; const MODERATE = 'Moderate' as Player; +const VICTORY = 'Victory'; +const DEFEAT = 'Defeat'; + +function create_effect( + type: Effect['type'], + target: Effect['target'], + value: Effect['value'] +): Effect { + return { + type, + target, + value, + }; +} + export { + create_effect, ANARCHIST, COMMUNIST, MODERATE, @@ -63,19 +80,12 @@ export { SELF, TOWARDS_CENTER, TRASH, + VICTORY, + DEFEAT, + FRONTS, }; -function create_effect( - type: Effect['type'], - target: Effect['target'], - value: Effect['value'] -): Effect { - return { - type, - target, - value, - }; -} + const data: StaticData = { cards: [ -- cgit v1.2.3