Tetris · glm-5.2
Build a playable Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.
transcript · 6 messages
Build a playable Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.
thinking
Let me build a complete Tetris game in a single index.html file.
I'll build a complete, self-contained Tetris game in a single HTML file.
index.html (16846 bytes)Successfully wrote 16846 bytes to index.html
thinking
Let me verify the file is present.
{"command":"ls -la index.html && echo \"---\" && head -c 50 index.html"}-rw-r--r-- 1 node node 16850 Jul 10 00:30 index.html --- <!DOCTYPE html> <html lang="en"> <head> <meta char
Done. `index.html` is a complete, self-contained Tetris game. **Features implemented:** - **All 7 tetrominoes** (I, O, T, S, Z, J, L) with distinct colors and full 4-state rotation matrices - **Rotation** with basic wall kicks (tries offsets so rotations near walls/floors succeed) - **Line clears** with proper row removal and cascading, plus classic scoring (100/300/500/800 × level for 1–4 lines) - **Increasing speed** — drop interval starts at 1000ms and shrinks by 80ms per level (min 80ms); level rises every 10 lines - **Next-piece preview** drawn on its own canvas, centered/trimmed - **Score, level, lines** HUD that updates live - **Ghost piece** showing where the active tetromino will land - **Hard drop** (Space, +2 pts/cell) and **soft drop** (↓, +1/cell) - **DAS/ARR** held-key auto-shift, pause (P), restart (R) - Start and game-over overlays with buttons **Controls:** ←/→ move, ↓ soft drop, Space hard drop, ↑/Z rotate, P pause, R restart. The board is a 10×20 grid on a 300×600 canvas with beveled cells for a clean look. Open `index.html` in any browser — no network or external assets required.
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 menu, keyboard controls move/rotate pieces, score updates, but pointer inputs (click/drag/wheel) do nothing.
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.