From b3568f03e4103dd46db2ccc680fbab0a6454d604 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Tue, 15 Sep 2026 13:56:10 -0400 Subject: fix: telnet buffer reuse, bank stack handling, transport casino gate, and admin cache invalidation --- internal/game/casino.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'internal/game/casino.go') diff --git a/internal/game/casino.go b/internal/game/casino.go index 9f3b524..2e80bf3 100644 --- a/internal/game/casino.go +++ b/internal/game/casino.go @@ -47,6 +47,16 @@ func (w casinoWallet) PayCredits(amount int) { // then credits. func casinoAffordable(p *player.Player) int { return p.Credits + countChips(p) } +// inCasinoGame reports whether the player is currently seated at any casino +// table or machine. Nil-safe for test scaffolding without a Casino manager. +func (g *Game) inCasinoGame(name string) bool { + if g.Casino == nil { + return false + } + _, playing := g.Casino.Participation(name) + return playing +} + func (g *Game) casinoTable(roomID int, gameName string) (*casino.Table, bool) { room, err := g.World.LoadRoom(roomID) if err != nil { -- cgit v1.2.3