Snake · qwen3-vl-32b-instruct
Output generated Cost / run $0.0013 Runtime 34.7s
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.
index.html (5765 bytes)Successfully wrote 5765 bytes to index.html
I've created a playable Snake game in a single HTML file named `index.html`. The game features: - Canvas-based rendering with arrow key controls - A growing snake tail when food is eaten - Randomly generated food - Score tracking displayed on screen - Game over state with final score display - Restart functionality via a button The game runs completely offline with no external resources or network requests. You can open this file in any modern web browser to play. The implementation includes: - CSS for styling the game board, score display, and game over modal - JavaScript for game logic, including movement, collision detection, scoring, and restart functionality - All code is contained within the single HTML file as requested You're ready to play!