A professional Python pygame Tetris implementation for the AWS Build Games Challenge.
This release introduces professional repository organization with industry-standard structure, SRS-compliant piece rotations, and comprehensive development infrastructure for scalable team collaboration.
This project is part of the AWS Build Games Challenge, where developers build classic games using Amazon Q Developer CLI assistance. The challenge focuses on recreating timeless games while leveraging AI-powered development tools.
- Complete Tetris implementation with all 7 standard pieces (T, O, L, I, S, Z, J)
- Authentic NES Tetris colors and 3D block effects
- SRS-compliant piece rotations (Super Rotation System)
- Line clearing mechanics with authentic scoring
- Collision detection and boundary checking
- Smooth 60 FPS gameplay with keyboard controls
- GameField Component: Clean game area with contained grid lines (300×600px)
- ScoreBoard Component: Professional scoring and statistics display
- HowToPlayPanel Component: Always-visible player guidance
- GameUI Coordinator: Centralized component management
- Visual Excellence: Grid lines only in game field, no window-wide clutter
- Crystal-clear visual hierarchy with component boundaries
- Professional styling with subtle backgrounds
- Focused gameplay area without distractions
- Commercial-quality game presentation
- Intuitive information layout and enhanced readability
# Simple execution
python3 main.py
# Or use the launcher script
./scripts/run_tetris.sh
# Run all tests
python3 run_tests.py
# Or run specific test file
python3 -m pytest tests/
- Left/Right arrows: Move pieces horizontally
- Down arrow: Soft drop (faster fall + 1 point per cell)
- Up arrow: Rotate pieces
- Spacebar: Hard drop (instant drop + 2 points per cell)
- Close window: Quit game
Aws-Build-Games-Challenge-Maciej-Bus/
├── src/ # Core game source code
│ ├── main.py # Main game logic
│ ├── ui_components.py # Modular UI components
│ ├── pieces.py # Tetris pieces and SRS rotations
│ └── config.py # Game configuration
├── tests/ # Unit tests
│ └── test_tetris.py # Comprehensive test suite
├── scripts/ # Utility scripts
│ ├── run_tetris.sh # Game launcher
│ └── setup_environment.sh # Environment setup
├── docs/ # Documentation
│ ├── user-guide/ # User documentation
│ ├── technical/ # Technical documentation
│ └── release-notes/ # Release notes
├── assets/ # Game assets (future)
├── main.py # Entry point
├── run_tests.py # Test runner
└── requirements.txt # Dependencies
- Install dependencies:
pip install -r requirements.txt
- Run the game:
python3 main.py
- Run tests:
python3 run_tests.py
- Python 3.7+
- pygame 2.5.2+
This project includes comprehensive unit tests covering:
- Piece shape validation and SRS compliance
- Game logic testing
- Movement and rotation mechanics
- Boundary checking
- Line clearing functionality
- UI component validation
Comprehensive project documentation is available in the docs/
directory:
- Quick Start Guide - How to run and play the game
- SRS Compliance - Super Rotation System implementation
- Development Guide - Development workflow and guidelines
- Code Review - Technical analysis and quality assessment
- Improvement Plan - Implementation roadmap and examples
- Review Summary - Executive summary of code quality
- Release Notes v0.2.1 - Latest release details
- Release Notes v0.2.0 - Previous release details
🌟 Version 0.2.1 Released - Professional repository organization with SRS-compliant rotations!