diff options
Diffstat (limited to 'internal/game')
| -rw-r--r-- | internal/game/casino_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/game/casino_test.go b/internal/game/casino_test.go index 9f31a37..e43eb05 100644 --- a/internal/game/casino_test.go +++ b/internal/game/casino_test.go @@ -126,6 +126,13 @@ func TestRenderBaccaratSnapshot(t *testing.T) { if !strings.Contains(output, "\033[38;5;") { t.Fatalf("expected colored baccarat art: %q", output) } + // The light card style applies to baccarat hands too, with the half-block + // edges oriented to touch the white body (▄ top, ▀ bottom). + light := renderBaccaratSnapshot(snapshot, "none", true, 7, "light", nil) + lightLines := strings.Split(light, "\n") + if !strings.Contains(lightLines[1], "▄▄▄▄▄▄▄") || !strings.Contains(lightLines[7], "▀▀▀▀▀▀▀") { + t.Fatalf("baccarat light card edges flipped: top=%q bottom=%q", lightLines[1], lightLines[7]) + } for _, line := range strings.Split(output, "\n") { if color.VisibleLen(line) > 80 { t.Fatalf("baccarat line exceeds console width: %d", color.VisibleLen(line)) @@ -194,4 +201,9 @@ func TestRenderBlackjackSnapshotUsesCompactASCIIArt(t *testing.T) { if !strings.Contains(lightPlain, "▀▀▀▀▀▀▀") || !strings.Contains(lightPlain, "▄▄▄▄▄▄▄") { t.Fatalf("expected half-height light card edges: %q", lightPlain) } + // The card edges must touch the white body: ▄ blocks on top, ▀ on bottom. + plainLines := strings.Split(lightPlain, "\n") + if !strings.Contains(plainLines[1], "▄▄▄▄▄▄▄") || !strings.Contains(plainLines[7], "▀▀▀▀▀▀▀") { + t.Fatalf("light card edges flipped: top=%q bottom=%q", plainLines[1], plainLines[7]) + } } |
