Skip to content

tamarPal/KFChess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

KFC Chess Game ♔

A modern chess game implementation with advanced features and custom mechanics.

✨ Features

🎮 Core Game 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

🎵 Audio & Visual Experience

  • Sound Effects - Move, capture, and promotion sounds
  • Visual Feedback - Move history, score tracking, and messages
  • Real-time Updates - Live game state display

⌨️ Controls

  • Keyboard Input - Full keyboard control support
  • Piece Selection - Easy piece selection and movement
  • Jump Commands - Quick piece navigation

🛠️ Technical Architecture

🏗️ Design Patterns

  • 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

📁 Project Structure

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

🚀 Installation & Setup

Prerequisites

  • Python 3.8+
  • Required packages: opencv-python, Pillow, numpy, simpleaudio

Running the Game

cd KFC_Py
python main.py

🎯 Game Rules

Standard Chess Rules

  • All pieces move according to standard chess rules
  • Capture by moving to opponent's square
  • Turn-based play (White starts first)

Special Features

  • 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

🎨 Customization

The game supports easy customization of:

  • Piece sprites and animations
  • Sound effects
  • Board appearance
  • Player names
  • Physics parameters

🤝 Contributing

Feel free to contribute improvements, bug fixes, or new features!

📜 License

This project is open source and available under the MIT License.


Enjoy your chess game! 🎉

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages