Tetris · claude-opus-4.8
Output generated Cost / run $0.1580 Runtime 55.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.
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 Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.
thinking
I'm going to create a complete Tetris game as a standalone HTML file with all the game logic, rendering, and controls built in.
/workspace/index.html (10193 bytes)Successfully wrote 10193 bytes to /workspace/index.html
Done. `index.html` is a complete, self-contained Tetris game. Features: - **All 7 tetrominoes** (I, O, T, S, Z, J, L) with distinct colors - **Rotation** with wall-kick offsets so pieces rotate near edges - **Line clears** with standard scoring (100/300/500/800 × level for 1–4 lines) - **Increasing speed** — level up every 10 lines, drop interval shrinks - **Next-piece preview** on a side canvas - **Score, lines, and level** panels - Extras: ghost-piece drop indicator, hard drop (Space), soft drop, pause (P), and a start/game-over overlay Controls: ← → move, ↑ rotate, ↓ soft drop, Space hard drop, P pause. Open the file in a browser to play.