From ffc7b582e9c14fdc2e579b9239b5ff7ad9a0d90a Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Tue, 29 Sep 2026 19:48:32 -0400 Subject: feat: roulette history tracker --- internal/game/roulette_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'internal/game/roulette_test.go') diff --git a/internal/game/roulette_test.go b/internal/game/roulette_test.go index e581435..7b83807 100644 --- a/internal/game/roulette_test.go +++ b/internal/game/roulette_test.go @@ -173,3 +173,23 @@ func TestCasinoTestPortalAuthoredContract(t *testing.T) { } } } + +// A wager must not re-send the betting board; the board arrives on join, +// after settlement via the next-spin menu, or on an explicit "table". +func TestRouletteBetDoesNotResendBoard(t *testing.T) { + g, sess, conn := uxCasinoGame(t) + cfg := casino.TableConfig{ID: "roulette", Game: casino.GameRoulette} + g.emitCasinoEvents(g.Casino.Join(1, cfg, sess.Player.Name)) + if !strings.Contains(string(conn.data), "1to12") { + t.Fatalf("join did not draw the board: %q", conn.data) + } + conn.data = nil + g.executeBet(sess, []string{"10", "on", "red"}, "bet 10 on red") + text := string(conn.data) + if strings.Contains(text, "1to12") { + t.Fatalf("placing a wager redrew the board: %q", text) + } + if !strings.Contains(text, "You bet 10 on red") { + t.Fatalf("missing wager confirmation: %q", text) + } +} -- cgit v1.2.3