From 6232d41e5639f9c38e47b2bb65266e343ca26e8f Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 3 Oct 2026 02:16:00 -0400 Subject: feat: add casino_hints option and standardize casino command syntax --- internal/game/pai_gow_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'internal/game/pai_gow_test.go') 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 fortune", "bet ", "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 ") { + if !strings.Contains(text, "PAI GOW POKER") || strings.Contains(text, "bet N") { t.Fatalf("table should be the felt alone: %s", text) } -- cgit v1.2.3