Chess Battle is a Pythonic chess game board that allows you to play chess against a friend, a neighbour, a CFG classmate, a crush from Tinder, or a sibling, I guess you get the point by now. It provides a graphical user interface for a chessboard, complete with goofy and fun chess piece graphics. This README will guide you through the project, its setup, and usage.
- How to Install and Run the Project
- How to Run the Test Suites
- How to Use the Project
- Project Structure
- Credits
- License
To run Chess Battle on your local machine, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/your-username/chess-battle.git
-
Navigate to the project directory:
cd chess-battle -
Install the required Python dependencies using Pipenv. If you don't have Pipenv installed, you can install it with pip:
pip install pipenv
-
Install the project dependencies using Pipenv:
pipenv install
-
Activate the virtual environment:
pipenv shell
-
Run the game by executing the
menu.pyfile:python menu.py
-
Enjoy playing Chess Battle!
python run_tests.py
Chess Battle provides a user-friendly interface for playing chess. Here's how to use it:
-
Main Menu: When you start the game, you'll be greeted with a main menu that offers the following options:
NOTE: For users with smaller screens (under 16 inches), here's a tip to enhance your experience: Hold down the Shift key while dragging the corner of your screen inward to resize it while maintaining the aspect ratio.
- Play Chess: Start a new game of chess.
- Games History: View a history of previous games.
- Quit: Exit the game.
-
Playing Chess:
- Click on a chess piece to select it. Valid moves for the selected piece will be highlighted.
- Click on a highlighted square to move the selected piece there.
- Special moves like castling are supported!!.
- Pawn promotion occurs when a pawn reaches the opposite end of the board. Also supported.
- The game keeps track of check and checkmate conditions (of course).
-
Game History: You can view a history of previous games, including the moves made in each game. Say Whaaaaaaaat?!. All the movements are being recorded on the moves.json file for you.
-
Winning Screen: After a game ends, a winning screen will appear, allowing you to replay, return to the main menu, or quit the game.
The project is structured as follows:
menu.py: The main entry point for the game, including the main menu and game setup.game.py: Handles the game logic, including move validation and checkmate detection.models/: Contains classes for chess pieces, the chessboard, and other game-related functionality.assets/: Includes images and fonts used in the game.tests/: Contains unit tests for various game components.
This project was developed by Hannah Killoh, Heather Watson, and Sandra Molina Palencia as part of Code First Girl Summer Degree.
This project is licensed under the MIT License License - see the LICENSE file for details.
