From 6d9908b29c8187196d23b126b1165c7e0bd0fc76 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 1 Oct 2026 19:30:38 -0400 Subject: fix: casino pai gow sorting, universal unbet, table/rules split, remove solo timers --- internal/casino/roulette_history_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'internal/casino/roulette_history_test.go') 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() -- cgit v1.2.3