Skip to content

Pygame implementation of chess. Using stockfish. Windows/MacOS/Linux

License

Notifications You must be signed in to change notification settings

JasperTresidder/Chess-pygame

Repository files navigation

This is a pygame implementation of chess. Following all rules, playing against stockfish AI, Player vs Player or AI vs AI. First upload. Needs refinement.

Requires Python >=3.10
Size: 166Mb

Tips:

  • You may have to install your own version of Stockfish.
  • Games are automatically saved in the /data/games folder as a pgn file
  • You can resize the window how you like

Setup

Clone repo and change directory into the project.

git clone https://github.com/JasperTresidder/Chess-pygame.git
cd Chess-pygame

Create a virtual environment

python -m venv env

Activate the virtual environment

MacOS/Unix:

source env/bin/activate

Windows:

.\env\Scripts\activate

Install packages from the requirements list into the venv.
Then run the program

python -m pip install -r requirements.txt
python Chess.py

Important

- You may have to install your own version of Stockfish.
- Place the Stockfish application in the lit/stockfish/{your_platform}/ dictionary. and rename the application to 'stockfish'

TODO

  • Async evaluation of the position.
  • Ability to play vs AI as black
  • Load games
  • Click through moves using arrow keys. image image image image

Releases

No releases published

Packages

No packages published

Languages