oneshotlm
Compare all models on this prompt →

2048 · kat-coder-pro-v2

Build a playable 2048 game with arrow-key tile sliding and merging, smooth animations, a score, and win and lose states.

⛨ sandboxed Open in new tab ↗
transcript · 4 messages
user

Build a playable 2048 game with arrow-key tile sliding and merging, smooth animations, a score, and win and lose states.

assistant

I'll create a complete 2048 game with smooth animations, scoring, and win/lose states. Let me build this as a single HTML file with all CSS and JavaScript included.

write /workspace/index.html (21391 bytes)
toolResult

Successfully wrote 21391 bytes to /workspace/index.html

assistant

I've created a complete, playable 2048 game in a single HTML file. Here's what's included: **Features:** - **Arrow key controls** - Use arrow keys to slide tiles in all four directions - **Smooth animations** - Tiles slide smoothly and merge with a pop animation - **Score tracking** - Current score and best score (saved in localStorage) - **Win state** - Overlay appears when you reach 2048 - **Lose state** - Overlay appears when no moves are possible - **Mobile support** - Touch swipe controls and on-screen directional buttons - **Responsive design** - Adapts to different screen sizes - **Visual polish** - Gradient background, tile colors that change with value, glowing effect for 2048 tile **How to play:** 1. Open `index.html` in a web browser 2. Use arrow keys (or swipe on mobile) to slide all tiles 3. When two tiles with the same number touch, they merge into one with the sum 4. After each move, a new tile (2 or 4) appears in a random empty spot 5. Try to reach the 2048 tile! The game is fully self-contained with no external dependencies - just open the file and start playing!

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

modelkat-coder-pro-v2
vendorKwaipilot
harnesspi-agent
generated2026-07-31

EVALUATION

3/5 working

2048 grid responds to arrow keys with tiles sliding to the right edge; WASD, click, drag, wheel do nothing (as expected).

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion0.0%
on click0.0%
on drag0.0%
on wheel0.0%
on enter + space0.0%
on arrow keys4.1%
on w/a/s/d0.0%
frame spread51.6 / 255
console errors0
js errors none

METRICS

runtime70.4s
tokens in8.9k
tokens out5.6k
cached1.8k
cost / run$0.0089