Skip to main content

A Python chess GUI application using pygame and python-chess with Stockfish support

Project description

Python Chess GUI

Demo

A Python chess application with a graphical user interface built using pygame and python-chess library, featuring player vs Stockfish AI gameplay.

Features

  • Player vs Stockfish AI gameplay
  • Color selection (play as White or Black)
  • Adjustable AI difficulty (Level 1-5)
  • Move takeback (undo)
  • Hint system (get Stockfish's suggested move)
  • Real-time evaluation bar
  • Visual highlights for legal moves, last move, and check

Installation

macOS

# Install Stockfish
brew install stockfish

# Install pipx and the game
brew install pipx
pipx ensurepath
source ~/.zprofile
pipx install python-chess-gui

# Run the game
chess-gui

Debian/Ubuntu

# Install Stockfish
sudo apt install stockfish

# Install pipx and the game
sudo apt install pipx
pipx ensurepath
source ~/.bashrc
pipx install python-chess-gui

# Run the game
chess-gui

Controls

  • Mouse click: Select piece / move piece / menu selection
  • H: Get a hint (Stockfish's suggested move)
  • Z: Undo last move
  • N: New game (return to menu)
  • Q / Escape: Quit

Development

Clone and run from source:

git clone git@github.com:Bobain/python-chess-gui.git
cd python-chess-gui
pip install -e .
chess-gui

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_chess_gui-0.1.3.tar.gz (133.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_chess_gui-0.1.3-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file python_chess_gui-0.1.3.tar.gz.

File metadata

  • Download URL: python_chess_gui-0.1.3.tar.gz
  • Upload date:
  • Size: 133.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for python_chess_gui-0.1.3.tar.gz
Algorithm Hash digest
SHA256 cff034f831b3c730f8c17c917d08b2d9af2e42076438cbf07288f276ba332428
MD5 7417e3b846cdd227fe3f378142225275
BLAKE2b-256 8c62492fc1fd508b32dd72bec702f9f6cad347b4768ade5c8bc81714ab369bd0

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_chess_gui-0.1.3.tar.gz:

Publisher: publish.yml on Bobain/python-chess-gui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_chess_gui-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for python_chess_gui-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 545952dc71ecfbea44ffa6a923d7c31ca08f1cf914faf5dd0d65aa9fc0fff4eb
MD5 4ed162995ab98d9ed602338fb75ceceb
BLAKE2b-256 66c3f295e9e05fe111b3ea906a6041ecfef0de7e078a773521daafda68c79d85

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_chess_gui-0.1.3-py3-none-any.whl:

Publisher: publish.yml on Bobain/python-chess-gui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page