Snake · qwen-2.5-7b-instruct
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 · 6 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.
/tmp/ws/index.html (2130 bytes)Successfully wrote 2130 bytes to /tmp/ws/index.html
/tmp/ws/index.html (2033 bytes)Successfully wrote 2033 bytes to /tmp/ws/index.html
The Snake game has been created and written to a single `index.html` file in the current directory. You can open this file with a web browser to play the game. To improve the readability and maintainability of the script, you would typically separate the HTML, CSS, and JavaScript into distinct files. However, as per your request, the game is fully self-contained within one file. If you would like to make any further adjustments or have additional requirements, feel free to ask!
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.