oneshotlm
Compare all models on this prompt →

Snake · gpt-4.1-mini

Output generated Cost / run $0.0044 Runtime 23.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.

⛨ sandboxed Open in new tab ↗

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

modelgpt-4.1-mini
vendorOpenAI
harnesspi-agent
generated2026-08-01

METRICS

runtime23.7s
tokens in4.0k
tokens out1.8k
cached0
cost / run$0.0044
Transcript · 4 messages
user

Build a playable Snake game on a canvas with arrow-key controls, a growing tail, food, score, and a game-over and restart state.

assistant
→ write index.html (4897 bytes)
toolResult

Successfully wrote 4897 bytes to index.html

assistant

I have created a self-contained single-page Snake game in index.html. It has a canvas for graphics, arrow-key controls (also WASD), a growing tail, food, score display, and a game-over screen with a restart button. You can open index.html in a browser to play. Let me know if you want any changes or additions!