oneshotlm
Compare all models on this prompt →

Snake · kimi-k2.5

Output generated Cost / run $0.0088 Runtime 76.5s

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

modelkimi-k2.5
vendorMoonshot · Kimi
harnesspi-agent
generated2026-07-22

METRICS

runtime76.5s
tokens in9.9k
tokens out3.3k
cached6.1k
cost / run$0.0088
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 playable Snake game in a single HTML file. Let me create a complete implementation with:
- Canvas for rendering
- Arrow key controls
- Snake with growing tail
- Food spawning
- Score tracking
- Game over state
- Restart functionality

I'll make it visually appealing with a dark theme and simple graphics. No external resources needed.
→ write /workspace/index.html (11002 bytes)
toolResult

Successfully wrote 11002 bytes to /workspace/index.html

assistant
thinking
I've created a complete Snake game in a single HTML file. Let me verify it was created correctly.
→ bash {"command":"ls -la /workspace/index.html"}
toolResult

-rw-r--r-- 1 node node 11004 Jul 22 17:35 /workspace/index.html

assistant
thinking
The file was created successfully. Let me give the user a summary of what I built.

I've created a complete **Snake game** in `/workspace/index.html` with the following features: **Gameplay:** - Smooth snake movement with arrow keys or WASD - Snake grows when eating food (red squares) - Score increases by 10 points per food - Game over on wall collision or self-collision - Spacebar to pause/resume **Visuals:** - Dark gradient background with teal accent colors - Glowing snake head with animated eyes (directional) - Glowing food for visibility - Subtle grid overlay - Pause screen overlay **UI:** - Live score display - Game over modal with final score - Restart button to play again - Control instructions Open `index.html` in any browser to play!