Preserve first-match exchange inference
This commit is contained in:
parent
c0aefa5d14
commit
4efd60cb52
2 changed files with 4 additions and 1 deletions
|
|
@ -111,6 +111,9 @@ test("completed exchanges retain the lowest-higher-card inference across resampl
|
|||
const sample = createAnalysisScenario(scenario, { player: entry.player, seed: String(i) });
|
||||
assert.ok(sample.players[target]!.hand.some((card) => card.t === "ore" && card.v === 3));
|
||||
assert.ok(sample.players[target]!.hand.every((card) => card.t !== "ore" || card.v !== 4));
|
||||
assert.ok(
|
||||
sample.players[target]!.hand.slice(0, entry.info!.exchangeTake).every((card) => card.t !== "ore" || card.v < 5)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ export function replay(state: GameState, options?: { to?: number; trackKnowledge
|
|||
if (take < 0) {
|
||||
card.analysisBounds.max = Math.min(card.analysisBounds.max ?? Infinity, given.v);
|
||||
} else if (received && received.v >= 0) {
|
||||
(card.analysisBounds.excluded ??= []).push([given.v, received.v]);
|
||||
(card.analysisBounds.excluded ??= []).push([given.v, received.v + Number(index < take)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue