oneshotlm
Compare all models on this prompt →

Snake · ling-2.6-1t

Output generated Cost / run $0.0052 Runtime 45.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

modelling-2.6-1t
vendorinclusionai
harnesspi-agent
generated2026-08-01

METRICS

runtime45.5s
tokens in10k
tokens out7.3k
cached1.5k
cost / run$0.0052
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

I'll create a complete Snake game in a single HTML file with all the requested features.

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

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

assistant

I've created a fully playable Snake game with all the requested features: **Features included:** - **Canvas-based rendering** with smooth visuals and particle effects - **Arrow-key controls** (also supports WASD) - prevent 180° turns - **Growing tail** - snake grows when it eats food - **Food system** - apple-shaped food with glow effects - **Score tracking** - +10 points per food, displayed in real-time - **High score persistence** - saved to localStorage - **Game over state** - triggered by wall or self-collision with explosion particles - **Restart functionality** - "Play Again" button - **Pause/Resume** - Spacebar or pause button - **Mobile touch controls** - swipe gestures on the canvas **Visual design:** - Dark gradient background with neon green snake and red food - Glowing effects, rounded corners, and particle explosions - Responsive layout that works on mobile devices - Grid background for better spatial awareness - Animated eyes on the snake head that follow direction **Game mechanics:** - Snake speeds up as it grows (slows down at minimum speed for playability) - Food never spawns on the snake - Session-best tracking during the current game - Smooth movement with buffered input to prevent missed turns