Skip to content

feat(classic-games): 新增 Mini Berzerk 小游戏#772

Open
wyf027 wants to merge 1 commit into
mainfrom
codex/classic-game-20260703-2014-berzerk
Open

feat(classic-games): 新增 Mini Berzerk 小游戏#772
wyf027 wants to merge 1 commit into
mainfrom
codex/classic-game-20260703-2014-berzerk

Conversation

@wyf027

@wyf027 wyf027 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • 新增单文件 HTML + TailwindCSS CDN 小游戏:Mini Berzerk。
  • 文件路径:project/classic-games/20260703-2014-berzerk.html
  • 生成前已扫描历史 PR 与 project/classic-games/ 文件名;Berzerk 未与已使用玩法重复。

Validation

  • 文件存在,HTML 结构完整,包含 TailwindCSS CDN。
  • 包含可运行的 Berzerk 游戏逻辑:resetGamegameLoopfireShotupdateBerzerkrenderBerzerk
  • 已用 Node 解析内联 JavaScript:INLINE_JS_PARSE=pass
  • 已运行 git diff --check -- project/classic-games/20260703-2014-berzerk.html,无空白错误。
  • 仅暂存/提交本次新增 HTML 文件。

Audit

  • OVERALL_EXIT=0
  • AUDIT_DIR=/tmp/git-commit-audit-20260703-201726-84007
  • WARN 摘要:未发现 WARN 行。

Remote

  • Base main SHA: f5ba84844397901a59c6cd2c18f930a09c807230
  • Branch: codex/classic-game-20260703-2014-berzerk
  • Remote file commit: ab4f52de1ebc3a4d8df3805a1e50059b8e01a54b

@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: ab4f52de1e

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

Comment on lines +225 to +228
function updateBerzerk(dt) {
updatePlayer(dt);
updateRobots(dt);
updateShots(dt);

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 Stop updating collisions after game over

When the last life is lost, loseLife() sets gameOver = true but leaves the player and robot positions unchanged; this loop still calls updateRobots(dt) on subsequent animation frames, so if a robot is still within the collision radius, loseLife() keeps running and the Lives HUD drops below 0. Skip robot/shot updates once gameOver is true, or return immediately after the final life is consumed.

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