Tetris · kat-coder-air-v2.5
Build a playable Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.
transcript · 12 messages
Build a playable Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.
/tmp/ws/index.html (11576 bytes)Successfully wrote 11576 bytes to /tmp/ws/index.html
/tmp/ws/index.html (13582 bytes)Successfully wrote 13582 bytes to /tmp/ws/index.html
/tmp/ws/index.html (11532 bytes)Successfully wrote 11532 bytes to /tmp/ws/index.html
I'll build a complete, polished Tetris game in a single HTML file with canvas rendering, all 7 tetrominoes, rotation, line clears, increasing speed, next piece preview, and scoring.
/tmp/ws/index.html (13582 bytes)Successfully wrote 13582 bytes to /tmp/ws/index.html
{"command":"ls -la /tmp/ws/index.html && wc -l /tmp/ws/index.html"}-rw-r--r--. 1 node node 13592 Aug 1 20:58 /tmp/ws/index.html 537 /tmp/ws/index.html
The file is written and ready. Here's a summary of what's included: **All 7 Tetrominoes** — I, O, T, S, Z, J, L with distinct colors (cyan, yellow, purple, green, red, blue, orange) **Controls:** - `←` `→` — Move left/right - `↑` — Rotate (with wall kicks) - `↓` — Soft drop (+1 point per row) - `Space` — Hard drop (+2 points per row) - `P` — Pause **Features:** - **7-bag randomizer** — ensures fair piece distribution - **Ghost piece** — translucent preview showing where the piece will land - **Next piece preview** — shown in the sidebar - **Line clears** — with flash animation, scoring 100/300/500/800 × level for 1/2/3/4 lines - **Increasing speed** — drop interval decreases from 1000ms down to 50ms as level increases (levels up every 10 lines) - **Score, Lines, and Level display** - **Game over detection** — when new pieces can't spawn - **Start/Game Over overlay** with play button
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
EVALUATION
Only a static Tetris start menu with Play button is shown; clicking Play was never triggered by the probe inputs so no gameplay is visible.
Vision grade · anthropic/claude-sonnet-5
MEASUREMENTS
Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.