diff options
| author | historia <[not public]> | 2026-09-19 01:55:34 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-19 01:55:34 -0400 |
| commit | cc33072eced3d5460512c09c42ec4531c807d7af (patch) | |
| tree | b1b451fa87fa389cb8343a3645372f3b43f5523e /internal/casino/baccarat.go | |
| parent | 2c38386484cdb507c4687caceb37e0b963e33594 (diff) | |
| download | thehouseoficarus-cc33072eced3d5460512c09c42ec4531c807d7af.tar.gz | |
fix: casino stake preservation, world state reconciliation, casino game registration
Diffstat (limited to 'internal/casino/baccarat.go')
| -rw-r--r-- | internal/casino/baccarat.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/casino/baccarat.go b/internal/casino/baccarat.go index 2b2b060..62a83a5 100644 --- a/internal/casino/baccarat.go +++ b/internal/casino/baccarat.go @@ -185,10 +185,10 @@ func (t *baccaratTable) deal() []Event { } } events = append(events, settlement) - if p.Wallet != nil && !payoutFailed { - // The round resolved; the stakes are no longer outstanding. - p.Wallet.ResolveStakes() - } + // settleStakeOutcome already consumed this stake by handle (a payout + // removed it, a push/loss resolved it). Deliberately do NOT call the + // player-wide ResolveStakes here: it would also consume a stake left + // pending by an earlier failed payout, which must stay refundable. } t.resetRound() for _, p := range t.players.ordered() { |
