Skip to content

Clean up per-game rules and scoring guide - #92

Merged
austin-smith merged 1 commit into
mainfrom
clean-up-game-rules-descriptions
Aug 9, 2026
Merged

Clean up per-game rules and scoring guide#92
austin-smith merged 1 commit into
mainfrom
clean-up-game-rules-descriptions

Conversation

@austin-smith

Copy link
Copy Markdown
Owner

What Changed

  • Fixed the Scoring tab footnote that showed Klondike's "time bonus starts at 600 in 1-card draw and 900 in 3-card draw" text under every timed variant. The eight variants without a draw-mode choice now state their actual bonus: "Time bonus starts at 900, then drops by 1 point per second." Klondike and Golf footers are unchanged.
  • Moved all Rules & Scoring guide copy (rules bullets, terms, scoring rows, footnotes) out of the view into a new GameGuide type keyed by GameVariant, and renamed RulesAndScoringView to GameGuideView. The on-screen title stays "Rules & Scoring".
  • Added GameVariant.hasSelectableDrawMode (true only for Klondike) and pointed supportsDrawMode at it, so the capability has a single definition usable outside a live session.
  • Filled gaps in Klondike's rules (group moves, face-down flips, Kings with stacks filling spaces) and clarified Yukon's deal, TriPeaks' layout, and Pyramid's exposure wording.
  • Added GameGuideTests: draw-mode language may appear only in Klondike's guide, every mode's advertised win bonus is checked against a live session's actual bonus, Golf's stroke scoring is asserted, plus content-integrity checks.

Why

The scoring footer was hardcoded for Klondike and rendered for every variant, so each game's guide described a 1-card/3-card draw choice that only Klondike has. Extracting the copy into a testable type and tying the advertised numbers to the engine keeps any variant's guide from describing another game's mechanics again.

Validation

  • Full ComputerSolitaireTests target passes on macOS (592 tests) on this exact diff.
  • GameGuideTests (8 tests) pass, including the session-parity check that deals every GameMode and compares its real winTimeMaxBonus to the guide's advertised value.

UI Changes

Text-only. The Scoring tab's fine print for FreeCell, Spider, Yukon, Pyramid, TriPeaks, Forty Thieves, Canfield, and Scorpion now describes each game's actual time bonus instead of Klondike's draw modes, and the Rules tab copy edits above. No layout or behavior changes.

the scoring footnote showed klondike's 1-card/3-card time bonus text under
every variant. move all guide copy into GameGuide keyed by variant, state
each game's actual bonus, add hasSelectableDrawMode so only-klondike-has-
draw-modes lives in one place, rename the view to GameGuideView, fill
klondike's missing rules, and add tests that hold the copy to the engine's
behavior.
@austin-smith
austin-smith merged commit bd02924 into main Aug 9, 2026
3 checks passed
@austin-smith
austin-smith deleted the clean-up-game-rules-descriptions branch August 9, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant