2048 · ling-2.6-flash
Output generated Cost / run $0.0003 Runtime 66.5s
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 · 4 messages
Build a playable 2048 game with arrow-key tile sliding and merging, smooth animations, a score, and win and lose states.
I'll create a complete, single-file 2048 game with arrow-key controls, smooth animations, score tracking, win/lose states, and a clean UI — all in `index.html` in the current directory.
index.html (18407 bytes)Successfully wrote 18407 bytes to index.html
The 2048 game is built and saved to `index.html`. Just open it in any modern browser to play. **Features:** - **Arrow-key controls** (← ↑ → ↓) for tile sliding and merging - **Smooth CSS animations** for tile movement, merging, and new tile appearance - **Score tracking** with localStorage-persistent best score - **Win state**: displays when you create a 2048 tile (can keep playing) - **Lose state**: displays when no moves remain - **Touch/swipe support** for mobile devices - **Responsive UI** with clean gradient styling and a glass-like grid container