diff options
author | Frans Bongers <fransbongers@franss-mbp.home> | 2024-12-15 21:38:52 +0100 |
---|---|---|
committer | Frans Bongers <fransbongers@franss-mbp.home> | 2024-12-15 21:38:52 +0100 |
commit | 72afc8e31c9dcef58b1308eddd4d1dde489e4670 (patch) | |
tree | 1e5ea6603d3144f9b45214c3d1466c4cd693dea9 /data.ts | |
parent | 47b19b5e83850b5fac6e508468b227476d486025 (diff) | |
download | land-and-freedom-72afc8e31c9dcef58b1308eddd4d1dde489e4670.tar.gz |
victory and defeat on front and end game on defeat
Diffstat (limited to 'data.ts')
-rw-r--r-- | data.ts | 34 |
1 files changed, 22 insertions, 12 deletions
@@ -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: [ |