aboutsummaryrefslogtreecommitdiff
path: root/internal/game/casino_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-05 16:31:22 -0400
committerhistoria <[not public]>2026-09-05 16:31:22 -0400
commitf4ea40c4b3589104dfaced3481ba19c5735889ae (patch)
tree66ead13206e52a65e64d6ba5d1576b63954682e9 /internal/game/casino_test.go
parent9a716a7d2ce514f452b425caedc1a9a15cde09f0 (diff)
downloadthehouseoficarus-main.tar.gz
fix: max bet no longer listed numerically, non-bettors can leave mid-roundHEADmain
Diffstat (limited to 'internal/game/casino_test.go')
-rw-r--r--internal/game/casino_test.go12
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])
+ }
}