Add TriPeaks game variant - #52
Merged
Merged
Conversation
three-peak layout with rank-adjacent wrap matching, chain scoring, single-pass stock, and exact solver-backed hints validated by the hint probe
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. 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 #43.
What Changed
TriPeaksGeometry(three overlapping peaks — face-down rows of 3/6/9 over a face-up base row of 10, with shared boundary base cards),GameRulesTriPeaks(play any uncovered card one rank above or below the waste top, suit ignored, ranks wrapping K↔A↔2; face-down cards flip automatically once uncovered),GameSessionTriPeaks,AutoMoveAdvisorTriPeaks,GamePersistenceTriPeaks, andTriPeaksPlanner.HintPlannercaches lines per position like the other variants.GameVariant.tripeaksplus the corresponding cases across state, session, interaction, persistence validation (including stranded-card guards in every other variant's validator), tap policy, statistics, rules screen, and the settings switcher.StockView/WasteViewmoved fromViews/Klondike/toViews/Shared/StockWasteViews.swift— they serve Klondike, Spider, Pyramid, and now TriPeaks. The TriPeaks waste is a match target rather than a mover, soWasteViewgained anisTapEnabledknob that also drops the VoiceOver button trait and declared interactivity when off.docs/solitaire-rules-tripeaks.mdin the established per-variant format (implemented rules, explicit rule choices vs disagreeing sources, solver notes, measured baselines), linked from the README variant table.Why
TriPeaks is one of the most-played solitaire variants, rounds are fast, and its small perfect-information deals suit the solver-backed hint system unusually well — hints are verified lines rather than heuristics, including flip timing, which is most of the strategy.
Validation
bestLinemedian 0.07 ms. Baselines recorded in the probe ledger.UI Changes