diff options
Diffstat (limited to 'internal/casino/video_poker.go')
| -rw-r--r-- | internal/casino/video_poker.go | 12 |
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 { |
