Tetris · qwen3.6-27b
Build a playable Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.
transcript · 8 messages
Build a playable Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.
thinking
The user wants a complete, self-contained Tetris game in a single HTML file. Let me build this with all the requested features: 1. All seven tetrominoes (I, O, T, S, Z, J, L) 2. Rotation (wall kick support) 3. Line clears 4. Increasing speed as score increases 5. Next-piece preview 6. Score display I'll use a canvas for the main game board and another smaller canvas for the next-piece preview. Everything will be in one HTML file with inline CSS and JS.
/workspace/index.html (15173 bytes)Successfully wrote 15173 bytes to /workspace/index.html
thinking
The file has been created. Let me verify it's there and looks correct.
{"command":"ls -la /workspace/index.html && wc -l /workspace/index.html"}-rw-r--r-- 1 node node 15413 Jul 31 03:11 /workspace/index.html 612 /workspace/index.html
thinking
The file is created and has 612 lines. Let me do a quick sanity check on the HTML structure to make sure nothing's broken.
{"command":"grep -c \"<script>\" /workspace/index.html && grep -c \"</script>\" /workspace/index.html && grep -c \"<style>\" /workspace/inde1 1 1 1
thinking
All tags are properly opened and closed. The file is complete and self-contained.
Done. `/workspace/index.html` is a fully self-contained Tetris game with all requested features: - **7 tetrominoes**: I, O, T, S, Z, J, L — each with distinct colors - **Rotation**: SRS-style wall-kick rotation system (including I-piece specific kicks) - **Ghost piece**: translucent preview showing where the piece will land - **Line clears**: animated flash animation when rows are cleared - **Scoring**: 100/300/500/800 points for 1/2/3/4 lines × level, +1 per soft drop step, +2 per hard drop step - **Increasing speed**: drop interval decreases by 70ms per level (starts at 800ms, minimum 50ms) - **Next-piece preview**: shown in the side panel - **7-bag randomizer**: ensures fair piece distribution - **Level progression**: level increases every 10 lines cleared **Controls**: ← → to move, ↑ to rotate, ↓ for soft drop, Space for hard drop, P to pause, Enter to start/restart.
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, score/level/lines tracking, next-piece preview; game responds to keyboard input correctly.
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.