From ffbf0a0b158b0e2b234c6d4ac334db9242b73bae Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 00:50:39 -0500 Subject: [PATCH] sim-balance: opponent hand works before and after #38 (queuedCount optional) Co-Authored-By: Claude Opus 5.5 --- shared/bots/game-adapter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/bots/game-adapter.ts b/shared/bots/game-adapter.ts index c1cb167..11ded82 100644 --- a/shared/bots/game-adapter.ts +++ b/shared/bots/game-adapter.ts @@ -75,7 +75,9 @@ export function stateFromView(view: PlayerView, rng: Rng, filler: readonly GameC const me = view.you, them = other(me); const players = [] as unknown as [PlayerState, PlayerState]; players[me] = { deck: draw(view.deckCount), hand: view.hand, energy: view.energy, queue: view.queue, committed: view.committed, afk: 0, carry: 0 }; - players[them] = { deck: draw(view.opponent.deckCount), hand: draw(view.opponent.handCount + view.opponent.queuedCount), energy: view.energy, queue: [], committed: false, afk: 0, carry: 0 }; + // Before #38 handCount excludes queued cards and queuedCount exists; after #38 handCount is the full hand. + const o = view.opponent as { handCount: number; deckCount: number; queuedCount?: number }; + players[them] = { deck: draw(o.deckCount), hand: draw(o.handCount + (o.queuedCount ?? 0)), energy: view.energy, queue: [], committed: false, afk: 0, carry: 0 }; let seq = 0; const lanes = view.lanes.map(l => { const cards = [] as unknown as [CardInPlay[], CardInPlay[]];