feat(classic-games): 新增 Mini Mosaic 小游戏#1232
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: 428b3227f5
ℹ️ 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".
| if (marks[r][c] !== solution[r][c]) { | ||
| marks[r][c] = solution[r][c]; | ||
| hintTextEl.textContent = `Hint filled row ${r + 1}, column ${c + 1}.`; |
There was a problem hiding this comment.
Avoid hinting against a non-unique hidden board
Because this clue set has multiple valid 5x5 completions, comparing every marked cell to the single hard-coded solution is not a reliable correctness test. A player can complete an alternate board that satisfies all 25 clues; clicking Hint then enters this branch, overwrites the first cell that differs from the hidden board, and turns the previously solved board into one with clue errors. Please either choose a uniquely solvable mosaic or reveal only cells that are forced by the current clues.
Useful? React with 👍 / 👎.
Summary
project/classic-games/20260718-0354-mosaic-lite.htmlValidation
buildClues、neighbors、resetGame、cycleCell、clueState、puzzleStats、revealHint、cellClass、render、addEventListenernew Function(...)git diff --check -- project/classic-games/20260718-0354-mosaic-lite.htmlAudit
run-audit.shOVERALL_EXIT=0/tmp/git-commit-audit-20260718-035733-71942Commit
f275786d30504219a91ae9e67296e92df81b6e93428b3227f58443d3aa829f89f844caad29e1b36b