Skip to content

feat(classic-games): 新增 Mini Sea Wolf 小游戏#767

Open
wyf027 wants to merge 1 commit into
mainfrom
codex/classic-game-20260703-1744-sea-wolf
Open

feat(classic-games): 新增 Mini Sea Wolf 小游戏#767
wyf027 wants to merge 1 commit into
mainfrom
codex/classic-game-20260703-1744-sea-wolf

Conversation

@wyf027

@wyf027 wyf027 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • 新增单文件 TailwindCSS 小游戏:Mini Sea Wolf
  • 文件路径:project/classic-games/20260703-1744-sea-wolf.html
  • 本轮玩法未与已扫描 PR 或 project/classic-games/ 历史产物重复

Validation

  • HTML 文件存在,包含完整 <!doctype html></html> 结构
  • 已包含 TailwindCSS CDN:https://cdn.tailwindcss.com
  • 内联 JavaScript 已通过 new Function(...) 解析检查
  • git diff --check 通过
  • 暂存区确认仅包含本次新增 HTML 文件

Audit

  • OVERALL_EXIT=0
  • AUDIT_DIR=/tmp/git-commit-audit-20260703-174752-18958
  • WARN 摘要:未发现 WARN

Remote

  • base:main at f5ba84844397901a59c6cd2c18f930a09c807230
  • branch:codex/classic-game-20260703-1744-sea-wolf
  • file commit:f91e1ddf3c8fa2161830b2bc3da4745f547d359b

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

ℹ️ 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 +110 to +111
ships.forEach((ship) => {
if (torpedo.hit) return;

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 Skip ships already marked hit before awarding sinks

When two torpedoes overlap the same ship in the same animation frame, the first torpedo sets ship.hit, but the ship remains in ships until after the outer loop. Later torpedoes still pass this check and run score += ship.points/sunk += 1, so one ship can count as multiple kills and finish the 8-sink objective early; ignore ship.hit inside this loop or remove the ship immediately.

Useful? React with 👍 / 👎.

Comment on lines +240 to +243
document.getElementById("leftBtn").addEventListener("pointerdown", () => keys.add("ArrowLeft"));
document.getElementById("leftBtn").addEventListener("pointerup", () => keys.delete("ArrowLeft"));
document.getElementById("rightBtn").addEventListener("pointerdown", () => keys.add("ArrowRight"));
document.getElementById("rightBtn").addEventListener("pointerup", () => keys.delete("ArrowRight"));

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 Clear movement state on lost pointer releases

When the player presses a movement button and releases after dragging outside the button, or the pointer is canceled, these button-scoped pointerup handlers do not run, leaving ArrowLeft/ArrowRight in keys. Because updateScope() reads that set every frame, the scope keeps moving by itself until the same direction is pressed and released again; use pointer capture or document-level pointerup/pointercancel cleanup.

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