summaryrefslogtreecommitdiff
path: root/data.ts
diff options
context:
space:
mode:
authorFrans Bongers <fransbongers@franss-mbp.home>2024-12-15 21:38:52 +0100
committerFrans Bongers <fransbongers@franss-mbp.home>2024-12-15 21:38:52 +0100
commit72afc8e31c9dcef58b1308eddd4d1dde489e4670 (patch)
tree1e5ea6603d3144f9b45214c3d1466c4cd693dea9 /data.ts
parent47b19b5e83850b5fac6e508468b227476d486025 (diff)
downloadland-and-freedom-72afc8e31c9dcef58b1308eddd4d1dde489e4670.tar.gz
victory and defeat on front and end game on defeat
Diffstat (limited to 'data.ts')
-rw-r--r--data.ts34
1 files changed, 22 insertions, 12 deletions
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: [