oneshotlm
Compare all models on this prompt →

Snake · qwen3.7-flash

Build a playable Snake game on a canvas with arrow-key controls, a growing tail, food, score, and a game-over and restart state.

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

Build a playable Snake game on a canvas with arrow-key controls, a growing tail, food, score, and a game-over and restart state.

assistant
thinking
The user wants a complete Snake game in a single HTML file. Let me build it with:
- Canvas-based rendering
- Arrow key controls
- Growing snake tail
- Food spawning
- Score tracking
- Game over state with restart option

I'll write it all inline in one index.html file with no external dependencies.
write /tmp/ws/index.html (10272 bytes)
toolResult

Successfully wrote 10272 bytes to /tmp/ws/index.html

assistant
thinking
The file has been written successfully. Let me verify it exists and looks correct.
bash {"command":"ls -la /tmp/ws/index.html"}
toolResult

-rw-r--r--. 1 node node 11018 Aug 1 17:58 /tmp/ws/index.html

assistant
thinking
The file is there. Let me give a summary of what was built.

`/tmp/ws/index.html` is ready. Here's what's in it: **Gameplay** - 30×30 grid on a `<canvas>` with dark neon theme - Arrow keys or WASD to steer; eat red food to grow + score - Snake speeds up as your score climbs (110ms → 55ms tick) - **Win** at 50 points, **Game Over** on wall or self-collision **States** | State | Trigger | |---|---| | Start screen | Load page — click or press Space | | Playing | Default during gameplay | | Paused | Press Space while playing | | Game Over / Win | Hit wall, tail, or reach 50 pts — click or Space to restart | **Features** - 🟢 Glowing snake head with eyes that follow direction - 🔴 Pulsing/red-glow food with shine highlight - 🏆 Persistent high score via `localStorage` - 🎚️ Adaptive speed — gets faster as you eat more - Full inline: no external resources, runs sandboxed

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

modelqwen3.7-flash
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

3/5 working

Snake game runs with score, food, game-over/restart states; snake dies almost instantly, movement barely visible.

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 click1.6%
on drag0.0%
on wheel1.5%
on enter + space1.5%
on arrow keys0.0%
frame spread8.7 / 255
console errors0
js errors none

METRICS

runtime26.8s
tokens in9.1k
tokens out4.0k
cached3.3k
cost / run$0.0008