Skip to main content

A python chess engine

Project description

Pychess

Status Tests Codecov Python Version License

A chess library written in Python.

Pychess - Description - Installation - Usage - Game - Board - Move - Piece - Player - Square - Contributing - License

Installation

```bash
# Install from PyPI
pip install 56kyle-pychess

# Install from poetry
poetry add 56kyle-pychess
```

Description

The main purpose of this library is to try and practice constantly improving the quality of a codebase instead of allowing complexity to grow with time.

I was mainly inspired by the books "Clean Code" and "Clean Coder" both written by Robert C. Martin. Most of the code in this library is written with the principles of clean code in mind.

General Design Decisions

  • The Board class is immutable. This means that every time a move is made, a new board is created. This is to prevent the board from being in an invalid state.
  • Moves and most geometry related classes are described in terms of Points and Lines
  • Almost all iterables are sets to allow for hash comparisons of various frozen dataclass based objects

Simplifications

  • The board may not be infinite
  • The board must be a rectangle

Features

  • API
    • Game
    • Board
    • Move
    • Piece
    • Player
    • Square
  • Engine
  • UCI
  • GUI
  • Documentation

Usage

Game

TODO

Board

TODO

Move

TODO

Piece

TODO

Player

TODO

Square

TODO

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

56kyle-pychess-0.4.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

56kyle_pychess-0.4.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file 56kyle-pychess-0.4.0.tar.gz.

File metadata

  • Download URL: 56kyle-pychess-0.4.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.10.5 Windows/10

File hashes

Hashes for 56kyle-pychess-0.4.0.tar.gz
Algorithm Hash digest
SHA256 b0d95d999ca2bdf3130d032831d4dad74a3aa6b56dc195fafcff0829c586b49e
MD5 a3d051418ffe96b410bf1c5edfdb1e4a
BLAKE2b-256 5f55380c927ba616ada14d7cf923bc2d1733356874c2ba087f368e9ce09b5ff1

See more details on using hashes here.

File details

Details for the file 56kyle_pychess-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: 56kyle_pychess-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.10.5 Windows/10

File hashes

Hashes for 56kyle_pychess-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0407d999ab953cd2110fbf777528922c1f4f9719663817ba5f29fc567a26fc8f
MD5 4d887942b79cbdf2d396485f174f8dff
BLAKE2b-256 19fdb13cc87098608c35d9e22b1a79ce6e4d2fce903b8d7d8ad0126615b00336

See more details on using hashes here.

Supported by

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