oneshotlm
Compare all models on this prompt →

2048 · glm-5.2

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 · 6 messages
user

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

assistant
thinking
Let me build a 2048 game in a single index.html file. I'll include smooth animations, arrow-key controls, score tracking, and win/lose states.

I'll build a complete 2048 game with smooth animations, score tracking, and win/lose states.

write index.html (18146 bytes)
toolResult

Successfully wrote 18146 bytes to index.html

assistant
bash {"command":"ls -la index.html && echo \"---\" && head -5 index.html"}
toolResult

-rw-r--r-- 1 node node 18146 Jul 10 00:34 index.html --- <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

assistant

Done. I built a complete, self-contained **2048** game in `index.html` (no external resources, all CSS/JS inline). **Features:** - **Arrow keys / WASD + swipe** controls to slide all tiles in a direction - **Tile merging** — equal adjacent tiles combine into double their value, with the classic 2048 color palette - **Smooth animations** — tiles slide to their destination via CSS `transform` transitions (~130ms), merged tiles pop-scale, and new tiles pop-in - **Score + Best** tracking (best persisted to `localStorage`) - **Win state** — reaching 2048 shows a "You win!" overlay with a "Keep going" option to continue for higher scores - **Lose state** — when the board is full with no valid moves, a "Game over" overlay appears - **New Game** button and overlay buttons to restart anytime - Responsive board that resizes tile font/dimensions on window resize The slide animation works by updating each tile's CSS `transform` (driven by a `--pos` custom property), then removing merged-away source tiles after the transition completes, and finally spawning a new random tile (90% chance 2, 10% chance 4). You can open `index.html` directly in a browser to play.

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

modelglm-5.2
vendorZ.ai · GLM
harnesspi-agent
generated2026-07-10

EVALUATION

3/5 working

2048 game responds to arrow keys and WASD with tile sliding and score updates; merges and layout look correct.

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 wheel6.4%
on enter + space0.0%
on arrow keys2.7%
on w/a/s/d0.2%
frame spread26.5 / 255
console errors0
js errors none

METRICS

runtime76.6s
tokens in1.8k
tokens out5.9k
cached14k
cost / run$0.0217