From 1738326b21f02a1a4cd246b85026bc3f846511df Mon Sep 17 00:00:00 2001 From: Frans Bongers Date: Wed, 19 Mar 2025 22:09:20 +0100 Subject: refactor: FactionId to number --- types.d.ts | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'types.d.ts') diff --git a/types.d.ts b/types.d.ts index 16cae59..cb772a6 100644 --- a/types.d.ts +++ b/types.d.ts @@ -7,8 +7,12 @@ export type Brand = T & { export type Player = Brand; export type CardId = Brand; -export type FactionId = 'a' | 'c' | 'm'; +// export type FactionId = 'a' | 'c' | 'm'; +export type FactionId = 0 | 1 | 2; +export type FascistId = 3; export type FrontId = 0 | 1 | 2 | 3; +export type ClosestToDefeat = 4; +export type ClosestToVictory = 5; // export type FrontId = 'a' | 'm' | 'n' | 's'; export interface Front { @@ -35,7 +39,7 @@ export interface Game { bag_of_glory: FactionId[]; bonuses: number[]; current_events: CardId[]; - discard: Record; + discard: number[][]; engine: EngineNode[]; /** * Set to faction whos turn it is or null if not player turn @@ -49,25 +53,31 @@ export interface Game { first_player: FactionId | null; fronts: Front[]; glory: FactionId[]; - hands: Record; - hero_points: Record; + hands: CardId[][]; + hero_points: { + factions: number[]; + pool: number; + }; initiative: FactionId; - medallions: Record & { pool: Array }; + medallions: { + factions: number[][] + pool: Array + }; played_card: CardId | null; player_order: Player[]; - selected_cards: Record; + selected_cards: CardId[][]; fascist_cards?: CardId[]; // used for specific events - tableaus: Record; + tableaus: CardId[][]; /** * Used for event effect that allows Anarchist to put an event * card on top of the deck */ top_of_events_deck: CardId | null; tracks: number[]; - trash: Record; + trash: CardId[][]; triggered_track_effects: number[]; used_medallions: number[]; - glory_current_year?: Record | null; + glory_current_year?: boolean[] | null; fascist: 0 | 1 | 2; card_played: 0 | 1; hidden_bag?: 0 | 1; -- cgit v1.2.3