oneshotlm
Compare all models on this prompt →

2048 · ling-2.6-1t

Output generated Cost / run $0.0042 Runtime 37.7s

Prompt for this run

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 ↗

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

modelling-2.6-1t
vendorinclusionai
harnesspi-agent
generated2026-08-01

METRICS

runtime37.7s
tokens in8.7k
tokens out5.9k
cached1.5k
cost / run$0.0042
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

I'll build a complete, playable 2048 game with smooth animations, keyboard controls, and win/lose states - all in a single HTML file.

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

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

assistant

I've created a fully playable 2048 game with all the requested features: **Features implemented:** - ✅ **Arrow-key controls** (also supports WASD) - smooth tile sliding - ✅ **Tile merging** - same-value tiles combine when colliding - ✅ **Smooth animations** - merge pop, new tile appear, and slide transitions - ✅ **Score tracking** - with persistent best score (localStorage) - ✅ **Win state** - detects when 2048 is reached - ✅ **Lose state** - detects when no moves remain - ✅ **Touch/swipe support** - works on mobile devices - ✅ **Responsive design** - adapts to different screen sizes **Game mechanics:** - 4×4 grid with colored tiles - New tiles spawn randomly (90% chance of 2, 10% of 4) - Tiles slide in the chosen direction until hitting a wall or another tile - Merging tiles adds their sum to your score - Win at 2048 (option to keep playing) - Game over when grid fills with no valid moves The game is contained in a single `index.html` file with embedded CSS and JavaScript - no external dependencies.