The last patch for chess was probably shipped over 100 years ago, so it's time for some improvements:
- Knights can now jump in all directions, because real horses stopped using L-shaped movement centuries ago.
- Stalemate is no longer a draw. If you can't move, that's a you problem and your opponent gets another turn.
- Ėń pãşšãñţ has been disabled, so nobody ever has to spell it again.
- Added a new piece on h2/h7, the spy. Moves in sneaky L-shapes, but converts enemy pieces instead of capturing them. Can only convert once and dies in the process.
- Bishops can no longer capture queens. Just doesn't seem right.
- Fixed a bug where computers were better at chess than humans.
- Pawns can now move and capture both forwards and diagonally, like normal people. But they still can't move backwards. That would be ridiculous.
Executables for macOS and Windows can be found under releases.
Create and activate a virtual environment, for example via uv:
uv venv
source .venv/bin/activateInstall dependencies in editable mode:
uv pip install -e .Start game:
chess2Setup is still error-prone, because pygame and Docker aren't best friends.
Requirements: Install XQuartz (Mac) or Xming (Windows).
Build and start the Docker container:
docker-compose build
docker-compose upInstall dev dependencies:
uv pip install -e ".[dev]"Install pre-commit hooks for auto-formatting:
pre-commit installRun tests:
pytest tests/Creating macOS/Windows executables into /dist for releases:
pyinstaller chess2.spec