Commit fa7ac80
committed
feat(snake): add Snake mini-game tab with pause, bonus food, and skin palettes
- New Snake game as 4th tab with canvas rendering and game loop
- Snake engine: pure functions for grid movement, collision, scoring
- Bonus food: gold diamonds spawn randomly for +25pts +2 growth
- Pause overlay: shows PAUSED + score when leaving tab mid-game
- Skin palettes: 6 retro color schemes (Auto/Green/Olive/Amber/Grey/Rose)
cycle with P key, persisted in localStorage, Auto reads CSS theme var
- High score persistence across sessions, speed ramp as score increases
- Directional eyes on snake head, food chime, game-over sound
- Footer hides on Snake tab to maximize game area
- D-pad controls snake; Left/Right do NOT switch tabs while playing
- Power switch disabled on Snake tab to avoid P key conflict
- 24 unit tests (engine) + 4 e2e tests (Chromium/Firefox/WebKit)
- 48/48 e2e passing, 51/51 unit tests passing1 parent 915dd89 commit fa7ac80
10 files changed
Lines changed: 1149 additions & 12 deletions
File tree
- src
- components
- gameboy
- tabs
- lib
- styles
- tests
- e2e
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
0 commit comments