aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/roulette.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 17:05:14 -0400
committerhistoria <[not public]>2026-10-05 17:05:14 -0400
commite42952469dadfb3535633c66c881050ac128703c (patch)
treea78f7396b72cdbd6fa4f6c454c830f40cf2ad0cb /internal/casino/roulette.go
parent90ad8c0c33b519d5830c69d4128bdc984b5e9de8 (diff)
downloadthehouseoficarus-e42952469dadfb3535633c66c881050ac128703c.tar.gz
fix: gather verbs, walk oom, admin path bypass, roulette refund
Diffstat (limited to 'internal/casino/roulette.go')
-rw-r--r--internal/casino/roulette.go14
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."))
}
}