Busy with phase 3, but have to wait for the timeout to reset again :(

This commit is contained in:
Dabit
2026-03-10 21:53:47 +01:00
parent 22a5046486
commit 9cf306dc52
2 changed files with 13 additions and 3 deletions

View File

@@ -154,7 +154,10 @@ GameState.activePalette = GameConfig.PALETTES.MAGENTA;
Do NOT store palette color on `paddle1.color`, `paddle2.color`, or `ball.color` — those properties stay as fallback `'#fff'`. The palette is applied at draw-call time by reading `GameState.activePalette.accent` in the renderer. This keeps the physics/AI logic untouched.
</action>
<verify>Open index.html in a browser. The game starts at a blank black screen (title state). Open the browser console and run: `console.log(GameState.activePalette.accent)` — should log `'#ff00cc'`. `console.log(GameConfig.PALETTE_KEYS)` — should log `['MAGENTA','CYAN','LIME','WHITE']`.</verify>
<verify>
Open index.html in a browser. The game starts at a blank black screen (title state). Open the browser console and run: `console.log(GameState.activePalette.accent)` — should log `'#ff00cc'`. `console.log(GameConfig.PALETTE_KEYS)` — should log `['MAGENTA','CYAN','LIME','WHITE']`.
<automated>grep -c "PALETTES" index.html && grep -c "PALETTE_KEYS" index.html && grep -c "activePalette" index.html && grep -c "soundEnabled" index.html && grep -c "selectedMenu" index.html && grep -c "previousState" index.html</automated>
</verify>
<done>GameConfig has PALETTES and PALETTE_KEYS. GameState has activePalette pointing to MAGENTA preset, soundEnabled:true, selectedMenu:0, previousState:null. gameState starts at 'title'.</done>
</task>
@@ -277,7 +280,10 @@ Replace ALL occurrences of hardcoded `'#fff'` and `'rgba(255,255,255,0.8)'` in r
- Score display: change `'rgba(255,255,255,0.8)'` to `GameState.activePalette.accent`
- Center divider: keep dim `rgba(255,255,255,0.2)` (neutral, not palette-colored)
</action>
<verify>Open index.html. Verify: (1) Title screen renders with neon magenta glow on black background, menu shows Play and Settings. (2) Arrow keys change which item is highlighted. (3) Enter on Play goes to mode select with neon style. (4) Enter on Settings goes to settings screen showing difficulty/sound/palette. (5) Changing Color Scheme updates the palette (ball/paddle/text all change on next gameplay screen). (6) Completing a game shows "PLAYER X WINS N M" format with Play Again and Main Menu options. (7) Escape from settings/modeSelect returns to previous screen correctly.</verify>
<verify>
Open index.html. Verify: (1) Title screen renders with neon magenta glow on black background, menu shows Play and Settings. (2) Arrow keys change which item is highlighted. (3) Enter on Play goes to mode select with neon style. (4) Enter on Settings goes to settings screen showing difficulty/sound/palette. (5) Changing Color Scheme updates the palette (ball/paddle/text all change on next gameplay screen). (6) Completing a game shows "PLAYER X WINS N M" format with Play Again and Main Menu options. (7) Escape from settings/modeSelect returns to previous screen correctly.
<automated>grep -c "drawNeonText\|shadowBlur" index.html && grep -c "activePalette\.accent" index.html && grep -c "'title'" index.html && grep -c "'settings'" index.html && grep -c "ArrowUp\|ArrowDown" index.html && grep -c "Audio\.isInitialized" index.html</automated>
</verify>
<done>All 5 game states (title, settings, modeSelect, diffSelect, gameover) render with neon palette. Arrow-key navigation works. Palette switching affects all game colors. Game over shows winner + full score in the specified format.</done>
</task>