oneshotlm
Compare all models on this prompt →

Tetris · gpt-4.1-mini

Output generated Cost / run $0.0107 Runtime 63.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

modelgpt-4.1-mini
vendorOpenAI
harnesspi-agent
generated2026-08-01

METRICS

runtime63.1s
tokens in7.3k
tokens out5.1k
cached1.2k
cost / run$0.0107
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

I will create a complete self-contained single-page Tetris game in an index.html file. It will have: - A canvas for the main gameplay area - Rendering of all 7 tetrominoes - Rotation of pieces (with wall kick) - Line clearing with animation - Increasing speed as score increases - Next piece preview area - Score display I'll implement this fully in one file with embedded CSS and JS inside appropriate tags. Starting now.

→ write index.html (13024 bytes)
toolResult

Successfully wrote 13024 bytes to index.html

assistant

I have created a fully playable Tetris game inside a single index.html file. Features: - Canvas-based rendering of all 7 tetromino shapes with colors. - Piece rotation with wall kicks. - Line clearing with a flicker animation. - Score counting and level progression that increases piece drop speed. - Next piece preview. - Controls: Arrow keys to move/rotate/drop, space for hard drop, P for pause. - Display of current score and level. Open the index.html file in a browser to play. Let me know if you want any enhancements or explanations!