This is a simple implementation of a chess game using Python and the Pygame library. It allows two human players to play against each other on a graphical interface.
- Classic chess rules and gameplay
- Highlights valid moves for the selected piece
- Keeps track of move history and displays it in a move log panel
- Supports undoing moves and resetting the game
- Detects checkmate and stalemate conditions
- Python 3.x
- Pygame library
- Make sure you have Python 3.x installed on your system.
- Install the Pygame library by running the following command:
pip install -r requirements.txt
- Clone this repository or download the source code files.
- Run Main.py in Terminal
- Run the
main.py
file using Python. - The game window will open, displaying the chessboard.
- The white player always starts first.
- To make a move, click on the piece you want to move and then click on the destination square.
- Valid moves will be highlighted in yellow when a piece is selected.
- The move log panel on the right side displays the history of moves.
- Press the 'z' key to undo the last move.
- Press the 'r' key to reset the game.
Enjoy playing chess!