Snake · qwen3.6-plus
Build a playable Snake game on a canvas with arrow-key controls, a growing tail, food, score, and a game-over and restart state.
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 a single-page Snake game in one index.html file. Let me build a complete, playable Snake game with: - Canvas rendering - Arrow key controls - Growing snake tail - Food spawning - Score tracking - Game over screen - Restart capability - No external resources Let me write this directly.
/tmp/ws/index.html (8157 bytes)Successfully wrote 8157 bytes to /tmp/ws/index.html
thinking
The user asked me to build a playable Snake game as a single self-contained index.html file. I've created the file with: - Canvas-based rendering - Arrow key controls - Growing snake tail - Food placement - Score tracking with localStorage high score - Game over and restart states - Nice visual styling with dark theme, snake eyes, food glow effect - Progressive speed increase as you eat more food The file is complete and self-contained. Let me verify it exists.
Done. `index.html` is ready in the current directory. Here's what's included: - **Canvas rendering** — 30×20 grid with subtle dot grid background - **Arrow key controls** — prevents 180° reversal into yourself - **Growing tail** — starts at 3 segments, grows by 1 per food eaten - **Food** — red cell with a radial glow effect, randomly placed on empty cells - **Score & high score** — +10 per food, high score persisted in `localStorage` - **Progressive difficulty** — tick speed increases slightly with each food eaten - **Game over** — triggers on wall or self collision, shows overlay with score - **Restart** — press **Space** or click the canvas from any non-playing state - **Visual polish** — snake has eyes that follow movement direction, body color fades from head to tail, rounded cell corners
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
EVALUATION
Snake game starts on click, snake moves and dies quickly, shows game over and restart states as expected.
Vision grade · anthropic/claude-sonnet-5
MEASUREMENTS
Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.