Snake · mercury-2
Output generated Cost / run $0.0022 Runtime 4.3s
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 (3738 bytes)Successfully wrote 3738 bytes to index.html
The **Snake game** has been created as a single self‑contained `index.html` file in the current directory. It includes: - A canvas for rendering the game. - Arrow‑key controls. - Growing tail, food generation, score display. - Game‑over detection with a restart prompt (press **Space**). You can open `index.html` in any modern browser to play the game. Enjoy!