oneshotlm
Compare all models on this prompt →

Tetris · deepseek-v4-flash-0731

Output generated Cost / run $0.0232 Runtime 59.8s

Prompt for this run

Build a playable Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.

⛨ 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

modeldeepseek-v4-flash-0731
vendorDeepSeek
harnesspi-agent
generated2026-08-01

METRICS

runtime59.8s
tokens in16k
tokens out5.9k
cached14k
cost / run$0.0232
Transcript · 6 messages
user

Build a playable Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.

assistant
thinking
Let me build a complete Tetris game in a single index.html file. I'll write the entire thing.
→ write /workspace/index.html (17016 bytes)
toolResult

Successfully wrote 17016 bytes to /workspace/index.html

assistant
→ bash {"command":"cd /workspace && node -e \"\nconst fs=require('fs');\nconst html=fs.readFileSync('index.html','utf8');\nconst m=html.match(/<scr
toolResult

JS syntax OK, file size: 17016 -rw-r--r-- 1 node node 17024 Aug 1 05:18 index.html

assistant
thinking
The file is valid. Let me verify the game logic quickly by double-checking a few key parts. The game is complete. Job done.

Done. I built a complete, self-contained Tetris game in `/workspace/index.html` (17KB, no external resources). Features included: - **All seven tetrominoes** (I, O, T, S, Z, J, L) with distinct colors and 3D bevel styling - **7-bag randomizer** so each tetromino appears once before reshuffling - **Rotation** with wall kicks (tries center, then ±1, ±2 offsets) - **Line clears** with a white-flash animation before removal - **Increasing speed** — level rises every 10 lines; drop interval shrinks from 1000ms down to a floor of 80ms - **Next-piece preview** drawn on its own canvas - **Score** with standard scoring (100/300/500/800 × level) + soft-drop (1pt/cell) and hard-drop (2pt/cell) bonuses - **Ghost piece** showing drop target, hard drop (Space), pause (P), restart (R) - Game-over detection, start/play-again overlay, and a responsive layout Controls: ←/→ move, ↑ rotate, ↓ soft drop, Space hard drop, P pause, R restart.