From 82e571d227feeafd0af4011e701ce26b99c5e3d9 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 3 Oct 2026 00:51:41 -0400 Subject: fix: craps felt and wager description cleanup --- internal/casino/craps_clock.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal/casino/craps_clock.go') diff --git a/internal/casino/craps_clock.go b/internal/casino/craps_clock.go index 5357c93..30f56e5 100644 --- a/internal/casino/craps_clock.go +++ b/internal/casino/craps_clock.go @@ -27,6 +27,17 @@ func (t *crapsTable) shooter() *crapsPlayer { } return t.players.get(t.queue[0]) } + +// busy reports whether the named player's dice are still in the air. The +// command loop uses it to hold the prompt until the roll resolves, so the +// shake message is not split from its result by a stray prompt. Other players +// may still bet (and be prompted) during the same window. +func (t *crapsTable) busy(name string) bool { + t.mu.Lock() + defer t.mu.Unlock() + s := t.shooter() + return t.pendingRollTicks > 0 && s != nil && s.Name == name +} func (t *crapsTable) hasLiveBets() bool { for _, p := range t.players.ordered() { if p.HasBet { -- cgit v1.2.3