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.
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
METRICS
Transcript · 4 messages
Build a playable Snake game on a canvas with arrow-key controls, a growing tail, food, score, and a game-over and restart state.
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.
/tmp/ws/index.html (13724 bytes)Successfully wrote 13724 bytes to /tmp/ws/index.html
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