oneshotlm
Compare all models on this prompt →

2048 · gemini-3-flash-preview

Build a playable 2048 game with arrow-key tile sliding and merging, smooth animations, a score, and win and lose states.

⛨ sandboxed Open in new tab ↗
transcript · 4 messages
user

Build a playable 2048 game with arrow-key tile sliding and merging, smooth animations, a score, and win and lose states.

assistant
thinking
**Developing Interactive 2048**

I'm focusing on implementing the core game mechanics for 2048. This includes handling arrow-key input for tile movement and merging, and ensuring a smooth user experience with CSS transitions for animations. Tracking the score and defining win/loss conditions are also high on my agenda.

**Structuring Game Elements**

I'm now focused on building the foundational HTML for the game. This involves setting up the main container, the 4x4 grid structure, and placeholders for displaying the score and win/loss messages. My next step will be to define the CSS for styling these elements and the tiles themselves.

write index.html (17220 bytes)
toolResult

Successfully wrote 17220 bytes to index.html

assistant
thinking
**Reviewing Core HTML**

I'm currently examining the `index.html` file. My focus is on ensuring the 2048 game implementation is entirely self-contained within this single page, as per the requirements, with CSS and JavaScript embedded directly.

The 2048 game has been successfully built as a single-page, self-contained application in `index.html`. ### Features Included: - **Responsive Logic:** Handles sliding and merging of tiles in all four directions using arrow keys. - **Smooth Animations:** Uses CSS transitions for tile movement and keyframe animations for tile appearances and merges. - **Score Tracking:** Real-time score updates as you merge tiles. - **Win/Loss States:** Detects when you reach the 2048 tile or when no moves remain. - **Modern UI:** Matches the classic 2048 aesthetic with a clean color palette and clear typography. ### How to Play: 1. Open `index.html` in any modern web browser. 2. Use the **Arrow Keys** to move tiles. 3. Merge matching numbers to reach **2048**! 4. Use the **New Game** button to restart at any time. The file is located at `/workspace/index.html`.

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-3-flash-preview
vendorGoogle
harnesspi-agent
generated2026-07-22

EVALUATION

3/5 working

2048 clone responds to arrow keys with tile movement and merging and score updates; click/drag/wheel/enter/space have no effect as expected.

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.0%
on wheel0.0%
on enter + space0.0%
on arrow keys3.4%
on w/a/s/d0.0%
frame spread24.1 / 255
console errors0
js errors none

METRICS

runtime42.2s
tokens in7.6k
tokens out5.8k
cached0
cost / run$0.0213