oneshotlm
Compare all models on this prompt →

Snake · grok-4.6

Output generated Cost / run $0.0391 Runtime 48.1s

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

modelgrok-4.6
vendorxAI · Grok
harnesspi-agent
generated2026-08-13

METRICS

runtime48.1s
tokens in7.6k
tokens out4.4k
cached1.7k
cost / run$0.0391
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 me to build a complete Snake game as a single self-contained HTML file. Let me create a polished, playable Snake game with all the requested features.

I'll build a self-contained Snake game in `index.html` with canvas rendering, arrow keys, growing tail, food, score, and restart.

→ write /tmp/ws/index.html (13724 bytes)
toolResult

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

assistant
thinking
The file was written successfully. The user asked for a playable Snake game in a single index.html file. I've created it with all the required features. Let me give a brief summary.

`index.html` is a self-contained Snake game — no external assets. **Play:** arrow keys or WASD, **Space** to pause, **Play/Restart** on the overlay. - Canvas grid, growing tail, red food (+10) - Score and best (saved in `localStorage` when available) - Crash into wall or yourself → game over and restart - Fills the board → win screen