2048
Slide tiles with the direction buttons; equal tiles merge and the score grows. A new 2 (or occasionally 4) appears after every move that changes the board. The game ends when the grid is full with no equal neighbours.
Controls
| Button | Action |
|---|---|
| Up / Down / Left / Right | Slide the board |
| Confirm | New game |
| Back | Exit |
Notes
- The best score is kept in
/.apps/2048/best.txtand written on game over, new game, and exit. - Tile shade tracks magnitude (white → light gray → dark gray → black), which is the one place the
panel renders true grayscale via
gui.fillRoundedRect. - Every move repaints the whole grid with
REFRESH_FAST; the panel diffs frames, so only changed tiles actually move.
Testing
Logic runs off-device with stubbed firmware globals:
nix run nixpkgs#lua -- _scratch/test_2048.lua