diff options
| author | historia <[not public]> | 2026-09-30 17:49:28 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-30 17:49:28 -0400 |
| commit | 2317022c16b520dd5272facfd5092a4c58cac44b (patch) | |
| tree | cc7501ecfb106e462457b2ba3489e7ce14d64c5a /internal/game/casino_commands_test.go | |
| parent | 39ad552cb5f48c288e1d7a62e80ceb180882eae0 (diff) | |
| download | thehouseoficarus-2317022c16b520dd5272facfd5092a4c58cac44b.tar.gz | |
fix: simplified simplified craps, removed unnecessary commands and instructions
Diffstat (limited to 'internal/game/casino_commands_test.go')
| -rw-r--r-- | internal/game/casino_commands_test.go | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/internal/game/casino_commands_test.go b/internal/game/casino_commands_test.go index 0ae1593..5e05d4e 100644 --- a/internal/game/casino_commands_test.go +++ b/internal/game/casino_commands_test.go @@ -102,25 +102,27 @@ func TestCasinoCompactHintsUseOnlyAvailableCommands(t *testing.T) { } func TestSimplifiedFeltSpacingAndNoIdlePrompt(t *testing.T) { text := renderCrapsSnapshot(&casino.CrapsSnapshot{Variant: "simplified"}, "none", true) - for _, want := range []string{"DICE TOTAL", "NET PROFIT", "3 or 4", "1:1 (even money)", "10 or 11", "LOSE STAKE", "ONE ROLL", "stake back"} { + for _, want := range []string{"SIMPLIFIED CRAPS", "DICE TOTAL", "PAYOUT", "3 or 4", "1:1", "10 or 11", "LOSE STAKE"} { if !strings.Contains(text, want) { t.Fatalf("missing %q: %s", want, text) } } - if strings.Contains(text, "WINS PAY 1:1") || strings.Contains(text, "COME-OUT") { - t.Fatal("stale simplified rules", text) + for _, stale := range []string{"even money", "NET PROFIT", "stake back", "PASS ONLY", "ONE ROLL", "COME-OUT"} { + if strings.Contains(text, stale) { + t.Fatalf("stale simplified rules %q", stale) + } } if strings.Contains(text, "Place a bet, then roll when ready.") { t.Fatal(text) } - rows := strings.Split(text, "\n") - for i, row := range rows { - if strings.Contains(row, "PASS ONLY") { - if i+1 >= len(rows) || strings.Trim(rows[i+1], "│ ") != "" || !strings.HasPrefix(rows[i+2], "└") { - t.Fatal("expected exactly one blank footer row", text) - } - return + rows := strings.Split(strings.TrimSuffix(text, "\n"), "\n") + for i := 0; i < len(rows)-1; i++ { + if strings.TrimSpace(rows[i]) == "" && strings.TrimSpace(rows[i+1]) == "" { + t.Fatalf("consecutive blank lines at %d: %q", i, text) } } - t.Fatal("missing pass label") + // The paytable ends at its own bottom border: no footer block remains. + if strings.Count(text, "─") == 0 || strings.Contains(text, "NO POINT, ODDS") { + t.Fatalf("stale footer: %q", text) + } } |
