diff options
| author | historia <[not public]> | 2026-10-01 19:30:38 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-01 19:30:38 -0400 |
| commit | 6d9908b29c8187196d23b126b1165c7e0bd0fc76 (patch) | |
| tree | ddbc02357ed92646b801687b90b1a06c71a15d71 /internal/game/pai_gow_test.go | |
| parent | 8a94f21bd47c0a00bc415395232dba22fa958837 (diff) | |
| download | thehouseoficarus-6d9908b29c8187196d23b126b1165c7e0bd0fc76.tar.gz | |
fix: casino pai gow sorting, universal unbet, table/rules split, remove solo timers
Diffstat (limited to 'internal/game/pai_gow_test.go')
| -rw-r--r-- | internal/game/pai_gow_test.go | 13 |
1 files changed, 11 insertions, 2 deletions
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 <amount> fortune", "bet <amount>", "table rules", "rules", "stop"} { + for _, want := range []string{"bet <amount> fortune", "bet <amount>", "table", "rules", "stop"} { if !strings.Contains(text, want) { t.Fatalf("missing %q at a fresh table: %s", want, text) } |
