From 8749fad48dfca5d4374e15539b160db28a4ed2dc Mon Sep 17 00:00:00 2001 From: Frans Bongers Date: Fri, 27 Dec 2024 20:45:12 +0100 Subject: refactor selected cards --- types.d.ts | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'types.d.ts') 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; current_events: CardId[]; discard: Record; engine: EngineNode[]; - final_bid: Record; + // 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; initiative: FactionId; medallions: Record & { pool: Array }; + played_card: CardId | null; + selected_cards: Record; tableaus: Record; tracks: number[]; - trash: Record; + trash: Record; 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']; -- cgit v1.2.3