oneshotlm
Compare all models on this prompt →

Tetris · gemini-2.5-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 · 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
**Building Tetris HTML**

I'm focusing on integrating all the necessary HTML, CSS, and JavaScript for a self-contained Tetris game within a single `index.html` file. The canvas element is my primary rendering surface.

**Structuring Tetris Components**

I'm currently organizing the foundational HTML structure, incorporating the canvas for gameplay and a dedicated area for the next piece preview. Styling considerations are also being integrated to ensure a clean presentation.

**Defining Tetrominoes**

I'm now focused on the core game mechanics, specifically defining all seven tetromino shapes and their rotation states within the JavaScript. This includes setting up the data structures to represent their forms and how they'll be manipulated on the game board.

**Defining Tetrominoes**

I'm currently implementing the data structures that define each tetromino's shape and their various rotation states. This involves setting up arrays to represent the blocks that make up each piece, ensuring accurate representation for manipulation on the game board.

write index.html (16128 bytes)
toolResult

Successfully wrote 16128 bytes to index.html

assistant
thinking
**Completing Core HTML**

I've finalized the `index.html`, integrating all specified functionalities. This includes the necessary structure for the canvas, score display, next piece preview, and the game over screen, along with basic CSS styling and the foundational JavaScript for game board logic, piece representation, and drawing.

**Finalizing Game Logic**

I've successfully implemented the core game loop and all essential mechanics. This includes piece generation, movement, rotation, collision detection, line clearing, scoring, and the increasing drop speed. The game over condition and restart functionality are also in place, ready for testing with user input.

I have created the `index.html` file with the Tetris game. You can open this file in a web browser to play the game.

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

modelgemini-2.5-flash
vendorGoogle
harnesspi-agent
generated2026-07-22

EVALUATION

4/5 working

Functional Tetris with falling pieces, next preview, score, and pieces stacking in response to keyboard input.

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 motion1.0%
on click2.1%
on drag1.9%
on wheel0.8%
on enter + space11.1%
on arrow keys10.1%
on w/a/s/d2.1%
frame spread24.5 / 255
console errors0
js errors none

METRICS

runtime35.8s
tokens in6.6k
tokens out5.5k
cached0
cost / run$0.0156