aboutsummaryrefslogtreecommitdiff
path: root/internal/game/pai_gow_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-03 02:16:00 -0400
committerhistoria <[not public]>2026-10-03 02:16:00 -0400
commit6232d41e5639f9c38e47b2bb65266e343ca26e8f (patch)
treead0c1676838a6c7e162d3a5c055f914016dac803 /internal/game/pai_gow_test.go
parentefccf58741ae43d9e891c6b743b146982b344ccf (diff)
downloadthehouseoficarus-6232d41e5639f9c38e47b2bb65266e343ca26e8f.tar.gz
feat: add casino_hints option and standardize casino command syntax
Diffstat (limited to 'internal/game/pai_gow_test.go')
-rw-r--r--internal/game/pai_gow_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/game/pai_gow_test.go b/internal/game/pai_gow_test.go
index 5ba367e..830b080 100644
--- a/internal/game/pai_gow_test.go
+++ b/internal/game/pai_gow_test.go
@@ -299,11 +299,16 @@ func TestPaiGowFeltAndJokerAllModes(t *testing.T) {
func TestPaiGowContextHintsFollowState(t *testing.T) {
g, sess, conn := casinoCrapsGame(t, "name: Pai Gow\ncasino_tables:\n - id: fortune\n game: paigow\n min_bet: 5\n max_bet: 1000\n pai_gow:\n envy: true\n")
g.executePlay(sess, []string{"pai"}, "play pai")
+ // Isolate the state-driven hint content from the casino_hints option.
+ if sess.Player.Options == nil {
+ sess.Player.Options = map[string]any{}
+ }
+ sess.Player.Options["casino_hints"] = "on"
// The join menu carries the context hints: the side bet, the main wager,
// and the shared tail.
text := stripANSI(string(conn.data))
- for _, want := range []string{"bet <amount> fortune", "bet <amount>", "table", "rules", "stop"} {
+ for _, want := range []string{"bet N fortune", "bet N", "table", "rules", "stop"} {
if !strings.Contains(text, want) {
t.Fatalf("missing %q in the join menu: %s", want, text)
}
@@ -313,7 +318,7 @@ func TestPaiGowContextHintsFollowState(t *testing.T) {
conn.data = nil
g.executeTableStatus(sess, nil, "table")
text = stripANSI(string(conn.data))
- if !strings.Contains(text, "PAI GOW POKER") || strings.Contains(text, "bet <amount>") {
+ if !strings.Contains(text, "PAI GOW POKER") || strings.Contains(text, "bet N") {
t.Fatalf("table should be the felt alone: %s", text)
}