feat(classic-games): 新增 Mini SOS 小游戏#840
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13ce7472ea
ℹ️ 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".
| } | ||
| botThinking = true; | ||
| render(); | ||
| window.setTimeout(botTurn, 450); |
There was a problem hiding this comment.
Cancel pending bot moves on restart
When the reset button is clicked during this 450ms delay, the queued botTurn still runs against the freshly reset board because the timeout is not stored/canceled and the callback has no game-generation guard. In that scenario the computer can place a piece at the start of the new game, and if the player already moved after resetting, the stale callback can produce an extra bot move in addition to the new turn's scheduled response.
Useful? React with 👍 / 👎.
Summary
project/classic-games/20260705-0615-sos.htmlsos在最近 PR 元数据与project/classic-games/的main文件名中均未出现Validation
new Function(...)语法解析git diff --check -- project/classic-games/20260705-0615-sos.html通过Audit
bash ~/.cursor/skills/git-commit/scripts/run-audit.shAUDIT_DIR=/tmp/git-commit-audit-20260705-061646-20028OVERALL_EXIT=0