oneshotlm
Compare all models on this prompt →

2048 · claude-opus-4.8

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 · 10 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
I'm going to create a complete 2048 game implementation in a single HTML file.
write index.html (11064 bytes)
toolResult

Successfully wrote 11064 bytes to index.html

assistant
thinking
I need to define the CSS custom property for the gap value that I'm using in the layout.

I need to define the `--gap` CSS variable I referenced.

edit {"path":"index.html"}
toolResult

Validation failed for tool "edit": - edits: must have required properties edits Received arguments: { "path": "index.html" }

assistant
edit {"path":"index.html","edits":[{"oldText":" .board {\n position: relative;\n background: #bbada0;","newText":" .board {\n --gap: 1
toolResult

Successfully replaced 1 block(s) in index.html.

assistant
bash {"command":"cd /workspace && node -e \"const fs=require('fs');const s=fs.readFileSync('index.html','utf8');console.log('len',s.length,'gap o
toolResult

len 11081 gap ok true

assistant

Done. `index.html` is a complete, self-contained 2048 game. Features: - **Arrow keys** (or WASD) to slide/merge tiles; **swipe** on touch devices - **Smooth animations**: tiles glide via CSS transforms, new tiles pop in, merges bump - **Score** tracking with a persisted **Best** score (localStorage) - **Win state** at 2048 and **Lose state** when no moves remain, both shown via an overlay with a restart button - Responsive layout with the classic 2048 color scheme Open it directly in any browser to play — no network or external assets needed.

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

modelclaude-opus-4.8
vendorAnthropic · Claude
harnesspi-agent
generated2026-07-08

EVALUATION

4/5 working

2048 clone responds correctly to arrow keys and WASD with tile movement, merging, and score updates; no self-animation or pointer input reaction.

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 keys6.3%
on w/a/s/d4.3%
frame spread25.4 / 255
console errors0
js errors none

METRICS

runtime64.5s
tokens in5.9k
tokens out5.8k
cached22k
cost / run$0.2182