oneshotlm
Compare all models on this prompt →

Snake · qwen3.6-plus

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 · 4 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 single-page Snake game in one index.html file. Let me build a complete, playable Snake game with:
- Canvas rendering
- Arrow key controls
- Growing snake tail
- Food spawning
- Score tracking
- Game over screen
- Restart capability
- No external resources

Let me write this directly.
write /tmp/ws/index.html (8157 bytes)
toolResult

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

assistant
thinking
The user asked me to build a playable Snake game as a single self-contained index.html file. I've created the file with:

- Canvas-based rendering
- Arrow key controls
- Growing snake tail
- Food placement
- Score tracking with localStorage high score
- Game over and restart states
- Nice visual styling with dark theme, snake eyes, food glow effect
- Progressive speed increase as you eat more food

The file is complete and self-contained. Let me verify it exists.

Done. `index.html` is ready in the current directory. Here's what's included: - **Canvas rendering** — 30×20 grid with subtle dot grid background - **Arrow key controls** — prevents 180° reversal into yourself - **Growing tail** — starts at 3 segments, grows by 1 per food eaten - **Food** — red cell with a radial glow effect, randomly placed on empty cells - **Score & high score** — +10 per food, high score persisted in `localStorage` - **Progressive difficulty** — tick speed increases slightly with each food eaten - **Game over** — triggers on wall or self collision, shows overlay with score - **Restart** — press **Space** or click the canvas from any non-playing state - **Visual polish** — snake has eyes that follow movement direction, body color fades from head to tail, rounded cell corners

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.6-plus
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

3/5 working

Snake game starts on click, snake moves and dies quickly, shows game over and restart states 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 click6.0%
on drag0.0%
on wheel6.7%
on enter + space6.7%
on arrow keys0.0%
on w/a/s/d0.0%
frame spread7.4 / 255
console errors0
js errors none

METRICS

runtime60.6s
tokens in6.3k
tokens out3.4k
cached0
cost / run$0.0087