oneshotlm
Compare all models on this prompt →

Snake · glm-5.3

Output generated Cost / run $0.0093 Runtime 16.2s

Prompt for this run

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 ↗

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.3
vendorZ.ai · GLM
harnesspi-agent
generated2026-08-27

METRICS

runtime16.2s
tokens in4.0k
tokens out1.2k
cached1.4k
cost / run$0.0093
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
→ write index.html (3574 bytes)
toolResult

Successfully wrote 3574 bytes to index.html

assistant

Done — `index.html` contains a complete Snake game: - **Arrow-key controls** (with 180° reversals blocked) - **Growing tail** — snake grows by one segment per food eaten - **Food & score** — red food spawns on empty cells, +10 points each - **Game over & restart** — overlay on wall/self collision with a Restart button - 20×20 grid, 120ms tick, all inline with no external resources