diff options
Diffstat (limited to 'internal/casino/manager.go')
| -rw-r--r-- | internal/casino/manager.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/casino/manager.go b/internal/casino/manager.go index c9dde5a..8a33df6 100644 --- a/internal/casino/manager.go +++ b/internal/casino/manager.go @@ -338,6 +338,19 @@ func (m *Manager) MachineBusy(name string) bool { return false } +// TableBusy reports whether any table has an action in flight for the named +// player. The command loop uses it to hold the prompt until the action lands. +func (m *Manager) TableBusy(name string) bool { + m.mu.Lock() + defer m.mu.Unlock() + for _, table := range m.tables { + if table.Busy(name) { + return true + } + } + return false +} + // RefundAll resolves every outstanding wager by refunding committed stakes // to their players and then closing each game's round. Graceful shutdown and // room eviction use this: rounds cannot settle, so no player may lose a |
