diff options
| author | historia <[not public]> | 2026-10-01 14:38:08 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-01 14:38:08 -0400 |
| commit | 1082f3336085c15992ca83d5553c0ba52208d70a (patch) | |
| tree | 4fcedaa90bc01c41456258a9d57f492f31754948 /internal/game/cmd_registry.go | |
| parent | d4eae333a8d8a96452bbf3617aa85b50466c11a7 (diff) | |
| download | thehouseoficarus-1082f3336085c15992ca83d5553c0ba52208d70a.tar.gz | |
feat: pai gow poker added to the casino
Diffstat (limited to 'internal/game/cmd_registry.go')
| -rw-r--r-- | internal/game/cmd_registry.go | 13 |
1 files changed, 13 insertions, 0 deletions
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) |
