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.2.tar.gz (133.1 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.2-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_chess_gui-0.1.2.tar.gz
  • Upload date:
  • Size: 133.1 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.2.tar.gz
Algorithm Hash digest
SHA256 3ade3c36e2c94444e445180dd028574fc8dffab5ad6b4524d861d24de3091108
MD5 c9679930e00f482cb5a129aea7b90631
BLAKE2b-256 233a7e5f69f9ebf9d7b36e4e5c5313a5ae42b239cc6593aa69bd07a786576703

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_chess_gui-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_chess_gui-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 79fc47f2f04cf46ac9699f5a9e26a745f00a1a84394ffab42ea035ae2d30d47b
MD5 f03c79f0dffabd402d648472a9be2394
BLAKE2b-256 9e1ee5193bc1ddad7495993380c185c6b8c5d1f7aa0b8b97a3c71640503c2ab8

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_chess_gui-0.1.2-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