From 1738326b21f02a1a4cd246b85026bc3f846511df Mon Sep 17 00:00:00 2001 From: Frans Bongers <fransbongers@macbookpro.home> Date: Wed, 19 Mar 2025 22:09:20 +0100 Subject: refactor: FactionId to number --- data.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'data.ts') diff --git a/data.ts b/data.ts index 424fcc7..98ee2be 100644 --- a/data.ts +++ b/data.ts @@ -1,4 +1,4 @@ -import { Card, Effect, FactionId, FrontId, Player, StaticData } from './types'; +import { Card, Effect, FactionId, FascistId, FrontId, Player, StaticData } from './types'; const LIBERTY = 0; const COLLECTIVIZATION = 1; @@ -21,8 +21,8 @@ const ARAGON = 0; const MADRID = 1; const NORTHERN = 2; const SOUTHERN = 3; -const CLOSEST_TO_DEFEAT = 'd'; -const CLOSEST_TO_VICTORY = 'v'; +const CLOSEST_TO_DEFEAT = 4; +const CLOSEST_TO_VICTORY = 5; const FRONTS: FrontId[] = [ARAGON, MADRID, NORTHERN, SOUTHERN]; const TOWARDS_CENTER = 10; @@ -33,10 +33,10 @@ const SELF = 'self'; const OTHER_PLAYERS = 'other'; const TRASH = 'trash'; -const ANARCHISTS_ID: FactionId = 'a'; -const COMMUNISTS_ID: FactionId = 'c'; -const FASCIST_ID = 'f'; -const MODERATES_ID: FactionId = 'm'; +const ANARCHISTS_ID: FactionId = 0; +const COMMUNISTS_ID: FactionId = 1; +const FASCIST_ID: FascistId = 3; +const MODERATES_ID: FactionId = 2; const ANARCHIST = 'Anarchist' as Player; const COMMUNIST = 'Communist' as Player; -- cgit v1.2.3