aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/video_poker.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-01 19:30:38 -0400
committerhistoria <[not public]>2026-10-01 19:30:38 -0400
commit6d9908b29c8187196d23b126b1165c7e0bd0fc76 (patch)
treeddbc02357ed92646b801687b90b1a06c71a15d71 /internal/casino/video_poker.go
parent8a94f21bd47c0a00bc415395232dba22fa958837 (diff)
downloadthehouseoficarus-6d9908b29c8187196d23b126b1165c7e0bd0fc76.tar.gz
fix: casino pai gow sorting, universal unbet, table/rules split, remove solo timers
Diffstat (limited to 'internal/casino/video_poker.go')
-rw-r--r--internal/casino/video_poker.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/casino/video_poker.go b/internal/casino/video_poker.go
index e5012f5..cc4ccfa 100644
--- a/internal/casino/video_poker.go
+++ b/internal/casino/video_poker.go
@@ -358,6 +358,16 @@ func (t *videoPokerTable) action(name, action string) []Event {
return t.statusLocked(name, false)
}
switch cmd {
+ case "unbet":
+ // Coins loaded but not yet dealt are the only removable wager; once
+ // the hand is dealt the stake is in play.
+ if p.loaded == 0 {
+ return []Event{t.private(name, "Nothing to take back.")}
+ }
+ p.loaded = 0
+ p.lines, p.remaining, p.result, p.current, p.next = nil, nil, "", nil, nil
+ p.multiplier, p.dice = 1, [2]int{}
+ return t.statusLocked(name, true)
case "coins":
if len(fields) > 2 {
break
@@ -431,7 +441,7 @@ func (t *videoPokerTable) action(name, action string) []Event {
p.featureOn = fields[1] == "on"
return t.statusLocked(name, false)
}
- return []Event{t.private(name, "Use bet [1-4|max], deal, game <name>, denom 1|10|50, hands <count>, paytable, or feature on|off on a bonus cabinet.")}
+ return []Event{t.private(name, "Use bet [1-4|max], unbet, deal, game <name>, denom 1|10|50, hands <count>, paytable, or feature on|off on a bonus cabinet.")}
}
func (t *videoPokerTable) drawLocked(name string, p *pokerPlayer) []Event {