2048 · muse-spark-1.2
Output generated Cost / run $0.0479 Runtime 40.7s
Prompt for this run
Build a playable 2048 game with arrow-key tile sliding and merging, smooth animations, a score, and win and lose states.
TAKE IT TO CODE
A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.
RUN
METRICS
Transcript · 6 messages
Build a playable 2048 game with arrow-key tile sliding and merging, smooth animations, a score, and win and lose states.
index.html (19330 bytes)Successfully wrote 19330 bytes to index.html
{"command":"ls -lh index.html && grep -c \"tile\" index.html && head -5 index.html"}-rw-r--r--. 1 node node 19K Aug 13 01:27 index.html 53 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
Playable 2048 built in **index.html** (single file, offline, no CDNs). **Features:** - 4×4 grid with smooth `left/top` slide transitions + `appear`/`pop` merge animations - Arrow keys / WASD / HJKL + swipe & mouse-drag + on-screen D-pad - Correct 2048 merge logic (one merge per tile per move, chain handling e.g. `[2,2,2,2]→[4,4]`) - Random 2 (90%) / 4 (10%) spawns, score with `+N` pop, Best score via `localStorage` - **Win** overlay at 2048 (Keep going / New Game), **Lose** overlay when no moves remain - Undo (Z / button), New Game (R / button), responsive layout