From 194164a77eb4f2479b94c19e6f0e1278ab608781 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 16:13:49 -0400 Subject: fix: more casino, economy, gameplay, security, and world data hardening gaps --- internal/casino/baccarat.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'internal/casino/baccarat.go') diff --git a/internal/casino/baccarat.go b/internal/casino/baccarat.go index 231a011..c9a50a1 100644 --- a/internal/casino/baccarat.go +++ b/internal/casino/baccarat.go @@ -369,6 +369,16 @@ func settleBaccaratBet(spot string, bet int, playerTotal, bankerTotal int, rules case bankerTotal > playerTotal: if spot == baccaratSpotBanker { bankerWin, _ := MulPayout(bet, rules.BankerPayout) + // The banker commission rounds UP, not down: when the wager is + // too small for a whole credit of commission, a winning banker + // bet returns only the stake. MulPayout's positive-stake floor + // would otherwise round the commission to zero and make the + // banker bet +EV (it wins more often than it loses, and ties + // push), which the "never bet less than one commission unit" + // rule exists to prevent. + if float64(bet)*rules.BankerPayout < 1 { + return "push", bet + } return "win", bet + bankerWin } default: -- cgit v1.2.3