Skip to content

feat(classic-games): 新增 Mini Turning Turtles 小游戏#1227

Open
wyf027 wants to merge 1 commit into
mainfrom
codex/classic-game-20260718-0124-turning-turtles-lite
Open

feat(classic-games): 新增 Mini Turning Turtles 小游戏#1227
wyf027 wants to merge 1 commit into
mainfrom
codex/classic-game-20260718-0124-turning-turtles-lite

Conversation

@wyf027

@wyf027 wyf027 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • 新增单文件 HTML + TailwindCSS 小游戏:Mini Turning Turtles
  • 文件路径:project/classic-games/20260718-0124-turning-turtles-lite.html
  • 历史扫描显示 Turning Turtles / turning-turtles-lite 未使用,本次选择该经典翻转博弈玩法

Validation

  • 确认文件存在并包含完整 HTML 结构、TailwindCSS CDN 与可运行游戏逻辑
  • 通过关键标记检查:startGamelegalMovesapplyMovechooseCellrunAiTurnchooseAiMovescoreMovefinishIfSolvedrenderaddEventListener
  • 通过内联脚本语法检查:new Function(...)
  • 通过 git diff --check -- project/classic-games/20260718-0124-turning-turtles-lite.html

Audit

  • 审计脚本:run-audit.sh
  • 结果:OVERALL_EXIT=0
  • WARN:无
  • AUDIT_DIR:/tmp/git-commit-audit-20260718-013129-60371

Commit

  • Local commit: fedf1e6a383128489c5055fcdc1af9ac12cc04a9
  • Remote commit: 2fd95586b106c96c9b2e4df52709c0baba51c867

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2fd95586b1

ℹ️ 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".

locked = true;
setMessage("AI is choosing a turtle...");
render();
window.setTimeout(runAiTurn, 260);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Cancel stale AI turns when resetting

When a player starts a new game while the 260 ms AI delay is pending, this timeout is neither canceled nor tied to a game generation, so the old callback runs against the newly reset turtles array. On a fresh all-up board chooseAiMove() can pick index 0 and immediately end the new game as an AI win, making reset unreliable during the AI's turn.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant