Neon Maze: a catch on the tick the last dot is eaten clears the level without losing a life

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

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

評価

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

調査の方向性

games/maze/scenes/GameScene.ts の、checkCatches() が clearLevel() より前に実行される tick() 付近(419〜427行目あたり)から始めてください。次に、460〜482行目あたりの die() と clearLevel() を読み、フェーズがどのように上書きされるかを確認してください。さらに、196行目あたりの update() で afterDeath() がどこで実行されるかを確認してください。最後のドットを食べたフレームで捕まった場合にライフが1つ減り、レベルが進まないことが完了条件です。npm test を実行し、テストスイートにそのためのハーネスがあれば、このケースの確認を追加してください。

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

説明

bug good first issue severity: low

Summary

In Neon Maze, if a chaser catches the runner on the same tick that the last dot is eaten, the level clears and the life is never lost.

Where

  • games/maze/scenes/GameScene.ts:419-427 (tick: checkCatches() then if (this.dots.size === 0) this.clearLevel())
  • games/maze/scenes/GameScene.ts:460-462, :480-482 (die() sets phase 'dying', clearLevel() overwrites it with 'clearing')
  • games/maze/scenes/GameScene.ts:196-204 (update only calls afterDeath(), which takes the life, from 'dying')

Details

tick() moves the runner (eating the dot), moves the chasers, then calls checkCatches(), which can call die(). It then goes on to clearLevel() with no phase check, so the 'dying' phase is replaced by 'clearing' and afterDeath() never runs.

Impact

Rare and in the player's favour: the death effects play over a level clear, no life is lost, and the run can be credited with a clear (and the maze.clear trophy) it should not have.

Steps to reproduce

  1. Leave one dot next to a chaser's path.
  2. Eat it just as an unscared chaser reaches the runner.
  3. The death burst plays, then the next level starts with the same lives.

Suggested fix

In tick(), return after checkCatches() if the phase is no longer 'play', or check this.phase === 'play' before calling clearLevel().

Acceptance criteria

  • A catch on the frame of the last dot costs a life and does not advance the level.

Getting started

  • Relevant files: games/maze/scenes/GameScene.ts
  • How to run tests: npm test

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

主要言語
TypeScript
スター
3
フォーク
3
平均マージ
8時間 13分
マージ済み PR(30日)
2

環境構築

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

はじめの一歩

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

TMHSDigital/GH-Arcade のほかの issue

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

似ている issue

TypeScript の issue をもっと見る

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

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