oneshotlm
Compare all models on this prompt →

Snake · granite-4.1-8b

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

⛨ 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

modelgranite-4.1-8b
vendorIBM · Granite
harnesspi-agent
generated2026-08-01

METRICS

runtime13.3s
tokens in4.9k
tokens out1.5k
cached1.6k
cost / run$0.0004
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 (4536 bytes)
toolResult

Successfully wrote 4536 bytes to index.html

assistant

The playable Snake game has been created and saved as **`index.html`** in the current directory. You can open this file in any web browser to play the game; it uses arrow‑key controls, a growing tail, food spawning, score tracking, and handles game‑over with a restart option—all contained within the single HTML file without any external resources. Enjoy!