The demo bot draws from the seed, the round and the seat

This commit is contained in:
Eric Wagoner
2026-09-23 11:01:32 -04:00
parent f1c9b29e66
commit 457a536f58
2 changed files with 13 additions and 6 deletions
+8 -1
View File
@@ -16,10 +16,17 @@ describe('High Card', () => {
expect(game.needsInput(s, 'A')).toBe(false);
});
it('replays to the same bot picks from the same seed', () => {
it('draws the same bot picks from the same seed, and different ones as rounds pass', () => {
const a = createGame({ A: 'Ann', B: 'Bo' }, 42);
const b = createGame({ A: 'Ann', B: 'Bo' }, 42);
expect(game.botInput(a, 'B')).toEqual(game.botInput(b, 'B'));
const picks = new Set<number>();
let s = a;
for (let i = 0; i < 12; i++) {
picks.add(game.botInput(s, 'B').pick);
s = resolveRound(s, { A: { pick: 1 }, B: game.botInput(s, 'B') });
}
expect(picks.size).toBeGreaterThan(1);
});
it('stamps the rules revision', () => {