From 6d9908b29c8187196d23b126b1165c7e0bd0fc76 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 1 Oct 2026 19:30:38 -0400 Subject: fix: casino pai gow sorting, universal unbet, table/rules split, remove solo timers --- internal/game/pai_gow_test.go | 13 +++++++++++-- 1 file changed, 11 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 9b37a68..b8a9c22 100644 --- a/internal/game/pai_gow_test.go +++ b/internal/game/pai_gow_test.go @@ -18,7 +18,7 @@ func TestPaiGowCommandsLookAndSettlement(t *testing.T) { t.Fatal("alias failed") } conn.data = nil - g.executeTableStatus(sess, []string{"rules"}, "table rules") + g.executeTableStatus(sess, nil, "table") text := stripANSI(string(conn.data)) for _, want := range []string{"FORTUNE", "ENVY", "750:1", "Three pair"} { if !strings.Contains(text, want) { @@ -147,6 +147,15 @@ func TestPaiGowShowdownOrderNamesAndColors(t *testing.T) { t.Fatalf("showdown missing %q:\n%s", want, clean) } } + // The hand labels are left-justified normal text, never centered over the + // card art. + for _, line := range strings.Split(clean, "\n") { + if strings.Contains(line, "Your high") || strings.Contains(line, "Dealer high") { + if strings.HasPrefix(line, " ") { + t.Fatalf("showdown label is indented, not left justified: %q", line) + } + } + } // Winning hand strengths are bold yellow; losing ones are bold white. if !strings.Contains(raw, "38;5;220m") { t.Fatalf("winning strength not yellow:\n%q", raw) @@ -296,7 +305,7 @@ func TestPaiGowContextHintsFollowState(t *testing.T) { conn.data = nil g.executeTableStatus(sess, nil, "table") text := stripANSI(string(conn.data)) - for _, want := range []string{"bet fortune", "bet ", "table rules", "rules", "stop"} { + for _, want := range []string{"bet fortune", "bet ", "table", "rules", "stop"} { if !strings.Contains(text, want) { t.Fatalf("missing %q at a fresh table: %s", want, text) } -- cgit v1.2.3