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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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