From 153acb7f644d755c45533b7c5311e3ffa47e8973 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 05:31:09 -0400 Subject: fix: harden engine across casino, economy, concurrency, security, and content --- internal/game/quit_casino_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'internal/game/quit_casino_test.go') diff --git a/internal/game/quit_casino_test.go b/internal/game/quit_casino_test.go index 50f9ac8..f373457 100644 --- a/internal/game/quit_casino_test.go +++ b/internal/game/quit_casino_test.go @@ -169,7 +169,9 @@ func TestQuitMidRoundMentionsQuitNow(t *testing.T) { // "quit now" starts the logout countdown while the player keeps their seat // and wager; the stake is forfeited and the seat freed only on the final -// tick, immediately before the disconnect. +// tick, immediately before the disconnect. The round must be IN FLIGHT for +// that: a stake placed in the betting window has had no card dealt for it and +// is refunded on disconnect (see markDisconnected). func TestQuitNowForfeitsOnlyAtLogout(t *testing.T) { g, sess := quitTestGame(t) sess.Account = &player.Account{Name: "alice"} @@ -177,6 +179,10 @@ func TestQuitNowForfeitsOnlyAtLogout(t *testing.T) { g.Casino.Join(1, cfg, "alice") g.Casino.Join(1, cfg, "bob") g.Casino.Bet(1, "blackjack", "alice", "", 10, casinoWallet{g: g, p: sess.Player}) + // Bob bets too so the round actually starts and alice holds a dealt hand. + bobWallet := player.New("bob") + bobWallet.Credits = 1000 + g.Casino.Bet(1, "blackjack", "bob", "", 10, casinoWallet{g: g, p: bobWallet}) wallet := sess.Player g.doQuitNow(sess) -- cgit v1.2.3