oneshotlm
Compare all models on this prompt →

Tetris · qwen3.5-plus-02-15

Output generated Cost / run $0.0112 Runtime 75.1s

Prompt for this run

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 ↗

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.5-plus-02-15
vendorQwen
harnesspi-agent
generated2026-08-01

METRICS

runtime75.1s
tokens in8.6k
tokens out5.7k
cached0
cost / run$0.0112
Transcript · 4 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 me to build a complete Tetris game in a single HTML file with:
- Canvas-based rendering
- All 7 tetrominoes (I, O, T, S, Z, J, L)
- Piece rotation
- Line clearing
- Increasing speed as score increases
- Next piece preview
- Score tracking

I'll create a self-contained index.html with embedded CSS and JavaScript. Let me build this step by step:

1. HTML structure with canvas elements (main game + next piece preview)
2. CSS for styling
3. JavaScript for game logic including:
   - Tetromino definitions (all 7 shapes with colors)
   - Game board (10x20 grid)
   - Piece movement and rotation
   - Collision detection
   - Line clearing
   - Score calculation
   - Speed increase based on score
   - Game loop
   - Next piece preview
→ write /tmp/ws/index.html (19374 bytes)
toolResult

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

assistant
thinking
I've created a complete, playable Tetris game in a single HTML file. Let me verify it was written correctly.

Done! I've created `index.html` with a fully playable Tetris game featuring: **Gameplay:** - All 7 tetrominoes (I, O, T, S, Z, J, L) with authentic colors - Rotation with wall-kick support - Soft drop (↓) and hard drop (Space) - Line clears with proper scoring (100/300/500/800 points for 1-4 lines) - Increasing speed as you level up (every 10 lines) - Ghost piece showing where the piece will land **UI Features:** - Next piece preview - Score, level, and lines display - Start/Restart buttons - Game over screen with final score - Clean dark theme with 3D-styled blocks **Controls:** - ← → : Move left/right - ↑ : Rotate - ↓ : Soft drop - Space : Hard drop