oneshotlm
Compare all models on this prompt →

Tetris · grok-4.6

Output generated Cost / run $0.0507 Runtime 64.4s

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

modelgrok-4.6
vendorxAI · Grok
harnesspi-agent
generated2026-08-13

METRICS

runtime64.4s
tokens in9.1k
tokens out6.2k
cached3.1k
cost / run$0.0507
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 as a single self-contained HTML file. Let me create a polished, playable Tetris with all the required features.

I'll build a complete, self-contained Tetris game in `index.html` with all seven pieces, rotation, scoring, speed-up, and a next-piece preview.

→ write /tmp/ws/index.html (16066 bytes)
toolResult

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

assistant
thinking
The file was written successfully. Let me verify it exists and is complete. The user asked for a playable Tetris with all seven tetrominoes, rotation, line clears, increasing speed, next-piece preview...

The game is a single self-contained `index.html` — no external assets. **Play:** open `index.html` and click **PLAY**. **Mechanics** - All 7 tetrominoes (I, O, T, S, Z, J, L) from a shuffled 7-bag - Clockwise / counterclockwise rotation with wall kicks - Line clears (1–4) with a brief flash, scoring 100 / 300 / 500 / 800 × level - Level every 10 lines; gravity speeds up (floor 90ms) - Next-piece preview, ghost piece, score / lines / level - Soft drop, hard drop, DAS/ARR for held left/right **Controls:** ← → move · ↓ soft drop · ↑ / X rotate · Z rotate CCW · Space hard drop · P pause