feat(classic-games): 新增 Mini Cant Stop 小游戏#1230
Conversation
Made-with: Cursor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2affb7773
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| statusEl.textContent = state.message; | ||
| claimedCountEl.textContent = state.claimed.size; | ||
| rollBtn.disabled = !state.rolling || state.gameOver; | ||
| bankBtn.disabled = state.gameOver; |
There was a problem hiding this comment.
Disable stopping while a roll choice is pending
After a player has already accumulated turn progress, clicking Roll sets state.rolling to false and displays mandatory move choices, but Stop remains enabled here and bankTurn() will bank the prior progress without applying any of the rolled choices. In that scenario the player can avoid a risky/undesired legal roll, contradicting the page's rule that a pairing must be picked after every roll and undermining the push-your-luck mechanic; the bank button should be disabled or ignored while !state.rolling.
Useful? React with 👍 / 👎.
Summary
project/classic-games/20260718-0254-cant-stop-lite.htmlValidation
setupState、rollDice、buildChoices、canApplyChoice、applyChoice、bankTurn、renderTracks、renderDice、renderChoices、render、addEventListenernew Function(...)git diff --check -- project/classic-games/20260718-0254-cant-stop-lite.htmlAudit
run-audit.shOVERALL_EXIT=0/tmp/git-commit-audit-20260718-025938-66522Commit
a77c825aaff2ca79247d332448e670745a78494da2affb7773773a6fc15c2f26267fbda9e0272909