diff options
| author | historia <[not public]> | 2026-10-01 19:30:38 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-01 19:30:38 -0400 |
| commit | 6d9908b29c8187196d23b126b1165c7e0bd0fc76 (patch) | |
| tree | ddbc02357ed92646b801687b90b1a06c71a15d71 /internal/casino/roulette_history_test.go | |
| parent | 8a94f21bd47c0a00bc415395232dba22fa958837 (diff) | |
| download | thehouseoficarus-6d9908b29c8187196d23b126b1165c7e0bd0fc76.tar.gz | |
fix: casino pai gow sorting, universal unbet, table/rules split, remove solo timers
Diffstat (limited to 'internal/casino/roulette_history_test.go')
| -rw-r--r-- | internal/casino/roulette_history_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/casino/roulette_history_test.go b/internal/casino/roulette_history_test.go index fbd2f65..8ac84a7 100644 --- a/internal/casino/roulette_history_test.go +++ b/internal/casino/roulette_history_test.go @@ -22,8 +22,9 @@ func TestRouletteHistoryTracksCompletedSpinsOnly(t *testing.T) { if !reflect.DeepEqual(before.History, expected) { t.Fatalf("history changed on bet: %v", before.History) } - // Two betting ticks, then two spinning ticks. No sample until the last. - for j := 0; j < 3; j++ { + // A lone player's spin starts at once; the sample only appears on + // the settling tick, never before. + for j := 0; j < table.Config.Roulette.SpinTicks-1; j++ { table.tick() if !reflect.DeepEqual(table.view().History, expected) { t.Fatal("history revealed before settlement") @@ -67,9 +68,10 @@ func TestRouletteHistoryTracksCompletedSpinsOnly(t *testing.T) { func TestRouletteCancelledSpinDoesNotEnterHistory(t *testing.T) { table := rouletteFixture() table.join("a") + table.join("idle") table.bet("a", "red", 1, &testWallet{chips: 100}) - table.tick() - table.tick() + // With a second seat the wager sits in the timed betting window, so the + // spin can still be cancelled by a disconnect. table.markDisconnected("a") table.tick() table.tick() |
