oneshotlm
Compare all models on this prompt →

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.

⛨ sandboxed Open in new tab ↗
transcript · 6 messages
user

Build a playable Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.

assistant
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.

write index.html (16846 bytes)
toolResult

Successfully wrote 16846 bytes to index.html

assistant
thinking
Let me verify the file is present.
bash {"command":"ls -la index.html && echo \"---\" && head -c 50 index.html"}
toolResult

-rw-r--r-- 1 node node 16850 Jul 10 00:30 index.html --- <!DOCTYPE html> <html lang="en"> <head> <meta char

assistant

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

modelglm-5.2
vendorZ.ai · GLM
harnesspi-agent
generated2026-07-10

EVALUATION

3/5 working

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.

idle motion0.0%
on click0.0%
on drag0.0%
on wheel0.0%
on enter + space4.0%
on arrow keys1.8%
on w/a/s/d0.8%
frame spread12.8 / 255
console errors0
js errors none

METRICS

runtime78.6s
tokens in1.8k
tokens out5.9k
cached14k
cost / run$0.0219