Tetris · kat-coder-pro-v2
Build a playable Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.
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.
I'll create a complete, playable Tetris game with all the requested features. Let me build this as a single self-contained HTML file.
/workspace/index.html (20842 bytes)Successfully wrote 20842 bytes to /workspace/index.html
Done! I've created a complete, playable Tetris game in a single HTML file at `/workspace/index.html`. **Features included:** ✅ **All 7 tetrominoes** (I, O, T, S, Z, J, L) with distinct colors ✅ **Rotation** with wall-kick detection ✅ **Line clears** with scoring: 100/300/500/800 points for 1/2/3/4 lines ✅ **Increasing speed** - drops faster as level increases (every 10 lines) ✅ **Next-piece preview** in the side panel ✅ **Score, level, and lines cleared** display ✅ **Ghost piece** showing where the piece will land ✅ **Hard drop** (spacebar) and **soft drop** (down arrow) ✅ **Pause** functionality (P key) ✅ **Game over** detection with restart option ✅ **Responsive design** that works on mobile too **Controls:** - **Arrow Left/Right** - Move piece - **Arrow Up** - Rotate - **Arrow Down** - Soft drop (faster fall) - **Space** - Hard drop (instant placement) - **P** - Pause/Resume The game runs entirely in the browser with no external dependencies. Just open `index.html` in any modern browser to play!
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
Functional Tetris with pieces falling, rotation, score/level/next preview, and a Game Over screen after WASD play.
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.