From 1082f3336085c15992ca83d5553c0ba52208d70a Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 1 Oct 2026 14:38:08 -0400 Subject: feat: pai gow poker added to the casino --- internal/game/cmd_registry.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'internal/game/cmd_registry.go') diff --git a/internal/game/cmd_registry.go b/internal/game/cmd_registry.go index fbb401c..d8f6b76 100644 --- a/internal/game/cmd_registry.go +++ b/internal/game/cmd_registry.go @@ -223,6 +223,9 @@ func classifyCommand(cmd string) CommandClass { if _, ok := casino.ParsePokerDigits(cmd); ok { return ClassInstant } + if _, ok := casino.ParsePaiGowDigits(cmd); ok { + return ClassInstant + } if def, ok := commandRegistry[cmd]; ok { return def.class } @@ -293,6 +296,16 @@ func (g *Game) executeCommand(sess *net.Session, cmd string, args []string, rawI } } + // Pai Gow owns these inputs only while seated; leave normal commands alone. + if p != nil && g.Casino != nil { + if t, playing := g.Casino.Participation(p.Name); playing && t != nil && t.Config.Game == casino.GamePaiGow { + numeric := cmd != "" && cmd[0] >= '0' && cmd[0] <= '9' + if numeric || cmd == "set" || cmd == "house" || cmd == "settle" { + g.executeTableAction(sess, strings.Join(append([]string{cmd}, args...), " ")) + return + } + } + } // Video poker: numeric tokens toggle holds and d draws, so both are // intercepted before the shared registry (where d means "down"). _, pokerDigits := casino.ParsePokerDigits(cmd) -- cgit v1.2.3