Add Pyramid game variant - #47
Merged
Merged
Conversation
# Conflicts: # ComputerSolitaire/Animation/WinCelebrationController.swift # ComputerSolitaire/Fixtures/ScreenshotFixtures.swift # ComputerSolitaire/Game/Klondike/AutoFinishPlanner.swift # ComputerSolitaire/Game/Klondike/GameSessionKlondike.swift # ComputerSolitaire/Game/Shared/AutoMoveAdvisor.swift # ComputerSolitaire/Game/Shared/GamePersistence.swift # ComputerSolitaire/Game/Shared/GameRulesShared.swift # ComputerSolitaire/Game/Shared/GameSession.swift # ComputerSolitaire/Game/Shared/GameState.swift # ComputerSolitaire/Game/Shared/GameVariant.swift # ComputerSolitaire/Game/Shared/HintAdvisor.swift # ComputerSolitaire/Game/Shared/Scoring.swift # ComputerSolitaire/Game/Shared/TapMovePolicy.swift # ComputerSolitaire/Views/RulesAndScoringView.swift # ComputerSolitaire/Views/Shared/BoardViews.swift # ComputerSolitaire/Views/StatisticsView.swift # ComputerSolitaireTests/Shared/ScreenshotFixtureTests.swift # README.md # tools/hint-probe/README.md # tools/hint-probe/main.swift # tools/hint-probe/run.sh
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Owner
Author
|
@codex review |
1 similar comment
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #22
What Changed
pyramid/discard/wasteRecyclesUsedstate fields with saved-game back-compat, newSelection/Destinationcases for pair removal, variant-aware win detection, all mutation through one purePyramidGameRules.stateByApplyingshared by the session and the move advisor.PyramidPlannerruns an exact two-stage search over a collision-free 59-bit packed position — weighted A* with an admissible heuristic and a partner-count prune that can prove deals unwinnable, then a max-clear stage so lost deals still get best-effort hints (silence is reserved for provably futile positions). Cached and ratcheted throughHintPlannerlike Yukon.tools/hint-probe(deal, hint follower, random control) per its acceptance recipe; the probe's state fingerprint gained a pyramid/discard section separator to avoid false revisit reports.Why
Issue #22 requests the Pyramid variant. The sources it links disagree on rules; this implements the common digital rule set (pyramid-only win, three passes, cover-pairs) — choices and rationale are documented in
docs/solitaire-rules-pyramid.md.Validation
UI Changes
New Pyramid board (seven overlapping rows with per-card drop targets), Pyramid top row (stock, single-card waste, discard pile), Pyramid entries in Settings, Statistics, and Rules & Scoring, and an App Store screenshot fixture.