Skip to content

56kyle/pychess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A casual chess project exploring the possible structurings to allow for different game modes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages