Snake · glm-5.2
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
Let me build a self-contained Snake game in index.html.
/workspace/index.html (8549 bytes)Successfully wrote 8549 bytes to /workspace/index.html
Done. `index.html` is a self-contained Snake game with everything inline (no external resources, no network). Features: - **Canvas grid** (20×20 cells) with rounded snake segments and a food apple - **Controls**: Arrow keys or WASD to steer, `P` to pause, plus swipe support for touch - **Growing tail**: each food eaten adds a segment (popped only when not eating) - **Score & best**: live HUD, best saved to `localStorage` - **Speed-up**: snake gets slightly faster as you score - **Game over**: wall or self collision shows an overlay with a **Restart** button; includes a paused state too Open `index.html` in any browser and hit Play.
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 start menu renders with snake preview and food, but no input ever starts actual gameplay.
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.