一道编程题,deepseek v3 ,qwen 25 plus 都失败了。claude sonnet 3.5 果然厉害,一次搞定。gemini 2.0 think 模式也作对了。
从这个题来看,claude sonnet 确实是 coding 超级牛的。其他非逻辑模型,基本都搞不定。
Please create a Tetris game with the following requirements:
Basic Game Mechanics:
Standard Tetris board layout
Different shaped pieces (tetrominoes)
Piece rotation and movement
Line clearing when filled
Game over detection
Controls:
Arrow keys for movement (left, right)
Up arrow for rotation
Down arrow/space for quick drop
Automatic piece falling
Scoring System:
Base points for clearing lines
Bonus scoring for multiple lines:
2 lines: 200 base + 200 bonus = 400 total
3 lines: 300 base + 300 bonus = 600 total
Dynamic speed increases:
Every 2000 points reduces interval by 100ms
Starting at 1000ms
Minimum interval of 100ms
Visual level-up indication
Visual Features:
Next piece preview window
Score display
Lines cleared counter
Game over screen
Level up animations
Bonus score animations
High Score System:
Store top 10 high scores in localStorage
Display scores sorted high to low
Include date for each score
Highlight current score in the list
Persistent between sessions
Additional Features:
Restart button on game over
Clean, modern visual design
Responsive controls
Performance optimization
Technical Requirements:
Use plain JavaScript (no frameworks)
HTML5 Canvas for game rendering
CSS for styling
Local Storage for high scores
Responsive design principles
The implementation should focus on:
Clean, maintainable code
Smooth gameplay experience
Intuitive user interface
Proper error handling
Performance optimization
Please provide the complete implementation with appropriate comments and documentation.
|