Tetromino
you are the world's leading HTML programmer that specializes in game dev. here is your next task: Generate a single, self-contained HTML file (all CSS and JavaScript inline, no external dependencies) that implements a fully playable Tetris game. The file must work in moder...
you are the world's leading HTML programmer that specializes in game dev. here is your next task: Generate a single, self-contained HTML file (all CSS and JavaScript inline, no external dependencies) that implements a fully playable Tetris game. The file must work in modern browsers when opened directly, with no additional setup. ### Required Features: 1. Tetrominoes: All 7 standard pieces (I, O, T, L, J, S, Z) with correct shapes and distinct colors. 2. Controls: - Left/Right Arrows: Move active piece horizontally - Up Arrow: Rotate piece clockwise - Down Arrow: Soft drop (increase fall speed temporarily) - Space Bar: Hard drop (drop piece instantly to the lowest valid position) - R Key: Restart game when in game over state 3. Core Mechanics: - 10-column x 20-row play grid (standard Tetris dimensions) - Pieces fall at a base speed of 1 row per 1000ms, decreasing by 50ms every 10 cleared lines (minimum 100ms) - Line clearing: Full horizontal lines are removed, all blocks above shift down immediately - Scoring: 100 pts per line, 300 for 2 lines, 500 for 3 lines, 800 for 4 lines (Tetris) - Next piece preview: Display the next tetromino to spawn in a small preview area - Game over: Triggered when a new piece cannot be placed at the top-center spawn position 4. UI Elements: - Display for current score, level, and total lines cleared - Game over overlay showing final score and "Press R to Restart" instruction - Clear visual distinction between the grid background, placed blocks, and active piece ### Constraints: - Single .html file only, all CSS and JS must be inline in <style> and <script> tags - No external libraries, frameworks, CDNs, or imported resources - Valid HTML5, use modern but widely supported CSS/JS features (ES6+ is fine) - Prioritize correct functionality over visual polish Return only the complete HTML file code, no additional explanation or markdown formatting. don't be lazy about it. and don't be boring. do your best work. impress me