|
| 1 | +# BUILD PR — Asteroids New Game Over Screen Timer |
| 2 | + |
| 3 | +## Purpose |
| 4 | +Implement the requested behavior exactly on the page being run: |
| 5 | + |
| 6 | +`http://127.0.0.1:5500/games/asteroids_new/index.html` |
| 7 | + |
| 8 | +When the visible **"Game Over" screen** is present, a 30-second timer must begin and then behave exactly as if Enter was pressed. |
| 9 | + |
| 10 | +## Exact Target Files |
| 11 | +- `games/asteroids_new/game/AsteroidsGameScene.js` |
| 12 | +- `games/asteroids_new/game/AsteroidsSession.js` |
| 13 | + |
| 14 | +## Required Code Changes |
| 15 | +1. Find the exact state/condition currently used to show the visible **"Game Over"** screen. |
| 16 | +2. Treat that visible screen as the timer trigger: |
| 17 | + - when the Game Over screen becomes visible, start a 30-second timer |
| 18 | + - when it is no longer visible, clear/reset the timer |
| 19 | +3. When the timer expires, execute the exact same return path used by pressing Enter on the Game Over screen. |
| 20 | + - do not create a parallel return path |
| 21 | + - reuse the same logic/path as the Enter handler |
| 22 | +4. Preserve current manual behavior: |
| 23 | + - pressing Enter on the Game Over screen must still work immediately |
| 24 | +5. If the Enter handler is not currently wired to the visible Game Over screen, repair that same wiring in these exact files only. |
| 25 | + |
| 26 | +## Hard Constraints |
| 27 | +- exact files only |
| 28 | +- do not modify original `games/Asteroids/*` |
| 29 | +- do not widen into flow, debug, assets, or unrelated systems |
| 30 | +- do not add new files |
| 31 | +- do not redesign gameplay |
| 32 | +- minimum-fix only: visible Game Over screen -> 30 second timer -> same path as Enter |
| 33 | + |
| 34 | +## Validation Steps |
| 35 | +- syntax-check all touched files |
| 36 | +- run from: |
| 37 | + `http://127.0.0.1:5500/games/asteroids_new/index.html` |
| 38 | +- verify pressing Enter on the visible Game Over screen returns immediately |
| 39 | +- verify waiting ~30 seconds on the visible Game Over screen triggers the exact same return behavior |
| 40 | +- verify timer does not run during active play |
| 41 | +- verify no original `games/Asteroids/*` files changed |
| 42 | + |
| 43 | +## Acceptance Criteria |
| 44 | +- the visible Game Over screen is the trigger |
| 45 | +- 30 seconds on that screen behaves exactly like Enter was pressed |
| 46 | +- Enter still works immediately |
| 47 | +- both manual and timed return use the same underlying path |
| 48 | +- original Asteroids files remain untouched |
0 commit comments