diff options
Diffstat (limited to 'internal/casino/roulette.go')
| -rw-r--r-- | internal/casino/roulette.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/internal/casino/roulette.go b/internal/casino/roulette.go index ad0a706..1069a68 100644 --- a/internal/casino/roulette.go +++ b/internal/casino/roulette.go @@ -822,11 +822,19 @@ func (t *rouletteTable) markDisconnected(name string) []Event { if p == nil { return nil } - // No outcome has been sampled or revealed during the spin. Disconnect - // refunds are safe, just as pre-deal baccarat refunds are. + // Once the spin starts the winning pocket is fixed, and from frame 5 it is + // on screen, so a disconnect refund would allow selective losses. Forfeit + // the stake while the wheel is spinning, matching Big 6; refund only before + // the spin starts. var events []Event if p.Wallet != nil { - if _, _, err := p.Wallet.RefundOutstanding(); err != nil { + var err error + if p.HasBet && t.phase == phasePlaying { + err = p.Wallet.PayCredits(0, p.Wager.ID) + } else { + _, _, err = p.Wallet.RefundOutstanding() + } + if err != nil { events = append(events, t.private(name, "Your stake remains pending for startup recovery.")) } } |
