aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/blackjack.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/casino/blackjack.go')
-rw-r--r--internal/casino/blackjack.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/casino/blackjack.go b/internal/casino/blackjack.go
index 5fb8b0b..925b7ef 100644
--- a/internal/casino/blackjack.go
+++ b/internal/casino/blackjack.go
@@ -101,6 +101,15 @@ func newBlackjackTable(roomID int, cfg TableConfig, rng *rand.Rand) *blackjackTa
}
func (t *blackjackTable) menuEvent(name string) Event {
+ if p := t.players.get(name); p != nil && p.HasBet {
+ if t.phase == blackjackPlaying && t.activeName() == name {
+ return t.turnMenuLocked(name)
+ }
+ if t.phase == blackjackInsurance && !p.declinedInsurance && p.insurance == 0 {
+ return t.insuranceMenuLocked(p)
+ }
+ return t.committedMenu(name)
+ }
if t.phase == blackjackPlaying || t.phase == blackjackInsurance {
return t.private(name, "Round in progress. You’ll join the next hand; table shows the current action.")
}