aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/baccarat.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-19 01:55:34 -0400
committerhistoria <[not public]>2026-09-19 01:55:34 -0400
commitcc33072eced3d5460512c09c42ec4531c807d7af (patch)
treeb1b451fa87fa389cb8343a3645372f3b43f5523e /internal/casino/baccarat.go
parent2c38386484cdb507c4687caceb37e0b963e33594 (diff)
downloadthehouseoficarus-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.go8
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() {