diff --git a/packages/games/src/othello/othello.test.ts b/packages/games/src/othello/othello.test.ts index 1b430fe..ddb1206 100644 --- a/packages/games/src/othello/othello.test.ts +++ b/packages/games/src/othello/othello.test.ts @@ -358,8 +358,8 @@ describe('views, replay, playouts', () => { throw new Error('disc count invariant broken'); } }; - const a = randomPlayout(othello, { players: ['A', 'B'], options, seed: seedN(i), invariant, maxSteps: 200 }); - const b = randomPlayout(othello, { players: ['A', 'B'], options, seed: seedN(i), maxSteps: 200 }); + const a = randomPlayout(othello, { players: ['A', 'B'], options, seed: seedN(i), invariant, maxSteps: 200, maxApplyMs: 30 }); + const b = randomPlayout(othello, { players: ['A', 'B'], options, seed: seedN(i), maxSteps: 200, maxApplyMs: 30 }); expect(a.finished).toBe(true); expect(JSON.stringify(a.finalState)).toBe(JSON.stringify(b.finalState)); expect(othello.result(a.finalState as OthelloState)).not.toBeNull(); diff --git a/packages/games/src/yacht/yacht.test.ts b/packages/games/src/yacht/yacht.test.ts index e1af267..55d8ce9 100644 --- a/packages/games/src/yacht/yacht.test.ts +++ b/packages/games/src/yacht/yacht.test.ts @@ -530,12 +530,12 @@ describe('random playouts (docs/09 ยง7)', () => { fullHouseAllowsYacht: i % 2 === 0, yahtzeeJoker: i % 6 === 0 ? 'free' : 'forced', }); - const a = randomPlayout(yacht, { players, options, seed: seedN(i), maxSteps: 20_000, invariant: checker() }); + const a = randomPlayout(yacht, { players, options, seed: seedN(i), maxSteps: 20_000, invariant: checker(), maxApplyMs: 30 }); if (!a.finished) throw new Error(`seed ${i} did not finish`); const r = yacht.result(a.finalState as YachtState)!; expect(r.ranking.flat().sort()).toEqual([...players].sort()); if (i % 25 === 1) { - const b = randomPlayout(yacht, { players, options, seed: seedN(i), maxSteps: 20_000 }); + const b = randomPlayout(yacht, { players, options, seed: seedN(i), maxSteps: 20_000, maxApplyMs: 30 }); expect(JSON.stringify(b.finalState)).toBe(JSON.stringify(a.finalState)); } }