summaryrefslogtreecommitdiff
path: root/types.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'types.d.ts')
-rw-r--r--types.d.ts28
1 files changed, 19 insertions, 9 deletions
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, TBrand extends string> = T & {
export type Player = Brand<string, 'Player'>;
export type CardId = Brand<number, 'CardId'>;
-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<FactionId | 'f', number[]>;
+ 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<FactionId, CardId[]>;
- hero_points: Record<FactionId | 'pool', number>;
+ hands: CardId[][];
+ hero_points: {
+ factions: number[];
+ pool: number;
+ };
initiative: FactionId;
- medallions: Record<FactionId, number[]> & { pool: Array<number | null> };
+ medallions: {
+ factions: number[][]
+ pool: Array<number | null>
+ };
played_card: CardId | null;
player_order: Player[];
- selected_cards: Record<FactionId, CardId[]>;
+ selected_cards: CardId[][];
fascist_cards?: CardId[]; // used for specific events
- tableaus: Record<FactionId, CardId[]>;
+ 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<FactionId, CardId[]>;
+ trash: CardId[][];
triggered_track_effects: number[];
used_medallions: number[];
- glory_current_year?: Record<FactionId, boolean> | null;
+ glory_current_year?: boolean[] | null;
fascist: 0 | 1 | 2;
card_played: 0 | 1;
hidden_bag?: 0 | 1;