sim-balance: opponent hand works before and after #38 (queuedCount optional)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 00:50:39 -05:00
co-authored by Claude Opus 5.5
parent 8ef2a28841
commit ffbf0a0b15
+3 -1
View File
@@ -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[]];