A modern chess game implementation with advanced features and custom mechanics.
- Full Chess Implementation - All standard chess pieces and moves
- Pawn Promotion - Automatic promotion to Queen when reaching the end
- Smart Collision Detection - Proper capture mechanics
- Turn-based Gameplay - Support for two players
- Sound Effects - Move, capture, and promotion sounds
- Visual Feedback - Move history, score tracking, and messages
- Real-time Updates - Live game state display
- Keyboard Input - Full keyboard control support
- Piece Selection - Easy piece selection and movement
- Jump Commands - Quick piece navigation
- State Machine - Each piece has multiple states (idle, moving, rest)
- Observer Pattern - Event-driven architecture for game updates
- Factory Pattern - Piece and graphics creation
- Publisher-Subscriber - Game events and notifications
KFC_Py/
├── Game.py # Main game logic and loop
├── GameFactory.py # Game creation and setup
├── Board.py # Chess board implementation
├── Piece.py # Base piece class
├── PieceFactory.py # Piece creation factory
├── Moves.py # Move validation logic
├── Physics.py # Movement physics
├── Graphics.py # Visual rendering
├── KeyboardInput.py # Input handling
└── pubsub/ # Event system
├── MoveHistoryObserver.py
├── SoundObserver.py
├── ScoreBoard.py
└── subscriber_message_observer.py
- Python 3.8+
- Required packages:
opencv-python,Pillow,numpy,simpleaudio
cd KFC_Py
python main.py- All pieces move according to standard chess rules
- Capture by moving to opponent's square
- Turn-based play (White starts first)
- Pawn Promotion: Pawns automatically become Queens at board end
- Visual History: All moves are tracked and displayed
- Audio Feedback: Different sounds for moves, captures, and promotions
- Score Tracking: Points awarded for captured pieces
The game supports easy customization of:
- Piece sprites and animations
- Sound effects
- Board appearance
- Player names
- Physics parameters
Feel free to contribute improvements, bug fixes, or new features!
This project is open source and available under the MIT License.
Enjoy your chess game! 🎉