Tetris · qwen3-235b-a22b-2507
Output generated Cost / run $0.0010 Runtime 66.7s
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.
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
METRICS
Transcript · 4 messages
Build a playable Tetris on a canvas with all seven tetrominoes, rotation, line clears, increasing speed, a next-piece preview, and score.
index.html (13843 bytes)Successfully wrote 13843 bytes to index.html
I've created a complete, playable Tetris game in a single HTML file as requested. The implementation includes all the requested features: - 🎮 All seven standard Tetris tetrominoes (I, J, L, O, S, T, Z) - 🔄 Rotation with wall kick logic - ✂️ Line clearing with scoring - 🚀 Increasing speed as levels advance - 👉 Next-piece preview - 🏆 Score tracking and level progression - ⌨️ Controls: arrow keys for movement/rotation, space for hard drop The game is fully self-contained with no external dependencies. It features: - Clean visual design with colored blocks and shading - Responsive controls - Game over state with restart option - Proper collision detection and piece merging The code is structured with clear separation of concerns between rendering, game state management, and input handling. Everything is contained in the single index.html file as required. You can now open index.html in any modern browser to play the game.