Skip to content

Chess Game: A Python-based Chess Game project with two-player gameplay, standard chess rules, and the ability to reset the game and change the theme of the chessboard. Future plans include adding an AI opponent. Download the latest release to play or contribute to the project!

License

Notifications You must be signed in to change notification settings

KabilanMA/chess-game-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Game

This is a Python implementation of a two-player chess game with all the standard chess rules, functionalities, and graphical interface using Pygame.

Features

  • Play chess against a friend locally on a single machine
  • Complete implementation of the standard chess rules, including castling, en passant, and pawn promotion
  • Interactive graphical interface with a chessboard and chess piece sprites
  • Turn-based gameplay with visual indications for player turns
  • Keyboard input for game controls:
    • Press "R" to reset the game
    • Press "T" to change the theme of the chessboard
  • Basic graphical themes for the chessboard, providing a visually appealing experience
  • Planned extension: AI opponent for single-player gameplay (coming soon!)

How to Run

Option 1: Install Package Requirements

  1. Make sure you have Python 3.x installed on your system.

  2. Clone this repository to your local machine or download the source code as a ZIP file.

  3. Install the necessary dependencies using pip:

    pip install -r requirements.txt
    
  4. Open a terminal or command prompt and navigate to the project's directory.

  5. Run the game using the following command:

    python ./src/main.py
    
  6. The game window will open, and you can start playing chess with a friend!

Option 2: Download the Release

  1. Visit the Releases page of this GitHub repository.
  2. Download the installer and follow the instruction to install the game (ChessGameSetup.exe). Uncheck the auto run at the end of the installation. (Because, there is a bug to be fixed in the auto run)
  3. Go to the installed directory
  4. Open the main.exe executable file
  5. The game window will open, and you can start playing chess with a friend!

Controls

  • Mouse: Click and drag a chess piece to move it to a valid position.
  • Keyboard:
    • Press "R" to reset the game and start a new match.
    • Press "T" to change the theme of the chessboard.

Future Plans

  • Implement AI opponent for single-player gameplay to enable playing against the computer.
  • Enhance the user interface with additional themes and customization options.
  • Add additional game modes or variants, such as timed matches or chess puzzles.
  • Improve the overall user experience based on feedback and suggestions.

Contributions

Contributions to this project are welcome! If you have any bug reports, feature requests, or improvements, please open an issue or submit a pull request.

Licence

This project is licensed under the MIT License.

Feel free to use, modify, and distribute this code for personal and educational purposes.

About

Chess Game: A Python-based Chess Game project with two-player gameplay, standard chess rules, and the ability to reset the game and change the theme of the chessboard. Future plans include adding an AI opponent. Download the latest release to play or contribute to the project!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages