oneshotlm
Compare all models on this prompt →

Tetris · qwen3.6-flash

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
The user wants a complete, self-contained Tetris game in a single HTML file. Let me build this with:

1. Canvas-based rendering
2. All 7 tetrominoes (I, O, T, S, Z, J, L)
3. Rotation system (SRS - Super Rotation System, or at least basic rotation)
4. Line clearing with animations
5. Increasing speed (level system)
6. Next piece preview
7. Score tracking
8. No external dependencies

Let me write a comprehensive implementation.
write /tmp/ws/index.html (21429 bytes)
toolResult

Successfully wrote 21429 bytes to /tmp/ws/index.html

assistant
thinking
Let me verify the file was created and check for any issues.
bash {"command":"wc -l /tmp/ws/index.html && head -5 /tmp/ws/index.html"}
toolResult

829 /tmp/ws/index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0">

assistant
thinking
The file is created successfully. Let me verify it's complete and valid.

Done! The file `index.html` has been written (829 lines, fully self-contained). Here's what's included: **Gameplay features:** - All **7 tetrominoes** (I, O, T, S, Z, J, L) with proper colors and shapes - **SRS rotation** with wall kicks for all pieces - **Ghost piece** showing where the piece will land - **Hard drop** (Space), **soft drop** (↓), left/right movement (←→) - **Lock delay** with move reset so you can slide while falling - **Line clears** with flash animation - **Increasing speed** per level (15 levels of speed progression) - **Score** based on lines cleared (single=100, double=300, triple=500, quad=800) × level - **Next piece preview** panel - **Level & Lines** tracking - **DAS (Delayed Auto Shift)** for responsive held-key movement **Controls:** | Key | Action | |---|---| | ← → | Move | | ↑ | Rotate CW | | Z | Rotate CCW | | ↓ | Soft drop | | Space | Hard drop | | P | Pause | | Enter/Start button | Start/Restart | Uses a **7-bag randomizer** for fair piece distribution. Runs entirely sandboxed with no external resources.

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

modelqwen3.6-flash
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

3/5 working

Tetris starts on Enter/Space, pieces fall and score updates, but board looks mostly empty with sparse pieces.

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.3%
on wheel0.0%
on enter + space4.0%
on arrow keys0.0%
on w/a/s/d0.8%
frame spread12.5 / 255
console errors0
js errors none

METRICS

runtime49.4s
tokens in20k
tokens out8.2k
cached0
cost / run$0.0131