summaryrefslogtreecommitdiff
path: root/types.d.ts
diff options
context:
space:
mode:
authorFrans Bongers <fransbongers@franss-mbp.home>2024-12-27 20:45:12 +0100
committerFrans Bongers <fransbongers@franss-mbp.home>2024-12-27 20:45:12 +0100
commit8749fad48dfca5d4374e15539b160db28a4ed2dc (patch)
tree12c3b418a99cdb15285d3cfebf99120b96dc7af9 /types.d.ts
parent9d0630a33e0358f943e68008823f355bceb71be1 (diff)
downloadland-and-freedom-8749fad48dfca5d4374e15539b160db28a4ed2dc.tar.gz
refactor selected cards
Diffstat (limited to 'types.d.ts')
-rw-r--r--types.d.ts29
1 files changed, 11 insertions, 18 deletions
diff --git a/types.d.ts b/types.d.ts
index 33e8456..b2b7aae 100644
--- a/types.d.ts
+++ b/types.d.ts
@@ -25,6 +25,8 @@ export interface Game {
seed: number;
state: string | null;
undo: Game[];
+ result?: string;
+ victory?: string;
// Game specific
active_abilities: number[];
turn: number;
@@ -32,11 +34,13 @@ export interface Game {
bag_of_glory: FactionId[];
blank_markers: number[][];
bonuses: number[];
- chosen_cards: Record<FactionId, CardId>;
current_events: CardId[];
discard: Record<FactionId | 'f', number[]>;
engine: EngineNode[];
- final_bid: Record<FactionId, CardId[]>;
+ // Set to faction whos turn it is or null if not player turn
+ // Used to determine who can spend Hero Points. Could be the case
+ // a faction is active in another factions turn.
+ faction_turn: FactionId | null;
fronts: {
a: Front;
m: Front;
@@ -48,22 +52,13 @@ export interface Game {
hero_points: Record<FactionId | 'pool', number>;
initiative: FactionId;
medallions: Record<FactionId, number[]> & { pool: Array<number | null> };
+ played_card: CardId | null;
+ selected_cards: Record<FactionId, CardId[]>;
tableaus: Record<FactionId, CardId[]>;
tracks: number[];
- trash: Record<FactionId, number[]>;
+ trash: Record<FactionId, CardId[]>;
triggered_track_effects: number[];
used_medallions: number[];
-
- result?: string;
- victory?: string;
-
- location?: string;
- selected?: string;
-
- state_data: any;
- // played_card: CardId
-
- // turn: Turn
}
export interface View {
@@ -73,20 +68,18 @@ export interface View {
prompt: string | null;
actions?: any;
victory?: string;
- location?: string;
- selected?: string;
- selected_card: CardId | null;
+ selected_cards: CardId[];
bag_of_glory: Game['bag_of_glory'];
bonuses: Game['bonuses'];
current_events: CardId[];
- final_bid: CardId[];
fronts: Game['fronts'];
glory: Game['glory'];
hand: CardId[];
hero_points: Game['hero_points'];
initiative: Game['initiative'];
medallions: Game['medallions'];
+ played_card: Game['played_card'];
tableaus: Game['tableaus'];
tracks: number[];
triggered_track_effects: Game['triggered_track_effects'];