This repository is a comprehensive implementation of a chess game. It provides both command-line and graphical user interfaces for players to engage in this classic game. This README aims to document the features, installation instructions, usage, and the design philosophy behind the project.
-
Two-Player Mode
Play against another human player locally or over a network. This feature supports complete menu-driven commands with options for starting a new game, saving, loading, and quitting the game. -
AI Opponent
Play against a computer opponent. The AI uses various algorithms to determine its moves, offering different difficulty levels that players can choose from. -
Graphical User Interface (GUI)
The game includes a user-friendly GUI that displays the chessboard, pieces, and possible moves visually. Players can interact with the game through clickable elements rather than just using the command line. -
Game Saving and Loading
Players can save their progress at any point, with the ability to load previously saved games. This feature ensures that users won't lose their game state if they need to break from playing. -
Move Validation
The game validates moves based on chess rules before applying them, ensuring compliance with the game's legal moves. This helps beginners learn the rules while preventing invalid moves.
Before you begin, make sure you have:
- Python 3.x installed on your machine.
- All the required libraries specified in
requirements.txt.
- Clone this repository:
git clone https://github.com/dteta2gh/chess.git cd chess - Install the required libraries:
pip install -r requirements.txt
- Run the application:
python main.py
Upon running the application, choose between playing against another player or against the AI. Follow the on-screen instructions to navigate through the menus. Use the game window to visualize your moves and interactions.
Contributions are welcomed! To contribute, please follow these steps:
- Fork this repository.
- Create a new branch for your feature:
git checkout -b feature/YourFeatureName
- Commit your changes:
git commit -m 'Add your feature' - Push to your branch:
git push origin feature/YourFeatureName
- Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Special thanks to the contributors and the chess community for their inspiration and guidance.
Feel free to reach out with any questions or comments!