Neon Maze: a caught chaser's eyes can travel through a wall cell

オープン 初心者向け
#10 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
game-dev

調査の方向性

games/maze/scenes/GameScene.tsを読み、特に477~481行目のcatchChaserと、259~277行目および360~371行目の方向選択を確認してください。まずnpm run typecheckとnpm run devを実行し、その後、issueに記載されたコーナーケースを再現します。捕まった追跡者の目が帰る途中で壁のマスに入らなくなれば完了です。変更を確認するため、npm run typecheckとnpm run buildを実行してください。

索引モデルが issue の本文から書いたものです。

説明

bug good first issue severity: low

Summary

When a chaser is caught just before a corner, its eyes can walk one cell into a wall before heading home.

Where

  • games/maze/scenes/GameScene.ts:477-481 (catchChaser)
  • games/maze/scenes/GameScene.ts:259-277, games/maze/scenes/GameScene.ts:360-371

Details

catchChaser snaps the chaser to the nearest cell centre but keeps its direction. Direction choice only runs on arrival at the next centre, so if the snap rounded forward onto a corner with a wall straight ahead, the eyes move into the wall before re-pathing. Traced in code, not reproduced.

Steps to reproduce

  1. Eat a power cell.
  2. Catch a chaser within half a cell of a corner that has a wall straight ahead.

Suggested fix

After snapping in catchChaser, call this.chaserAtCenter(ch) so a direction is chosen at the snapped cell.

Acceptance criteria

  • Eyes never overlap a wall cell on the way home

Getting started

  • Relevant files: games/maze/scenes/GameScene.ts
  • Run locally: npm install, then npm run dev
  • Checks: npm run typecheck and npm run build (there is no test suite yet)
  • Related docs: README.md

Filed by repo-audit/full-audit at b001f5d. Severity: low. Effort: S. audit-key: bug|games/maze/scenes/GameScene.ts|catchChaser-snap

主要言語
TypeScript
スター
3
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/GH-Arcade のほかの issue

TMHSDigital/GH-Arcade の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。