Skip to content
This repository was archived by the owner on Dec 3, 2021. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

26 Commits

Repository files navigation

This repository is deprecated and only here for historical reasons. The new repository can be found at https://github.com/LiBoard/Python.

LiBoard - Python module

The LiBoard Python module is used by the provided scripts and can be used for your own scripts. It handles the connection to the board and detecting legal moves played.

Installation

pip install git+https://github.com/LiBoard/Python-module

Usage example

importargparsefromliboardimportLiBoard, ARGUMENT_PARSERdefmain(_args: argparse.Namespace):
board=LiBoard(_args.port, _args.baud_rate, _args.move_delay)
@board.start_handlerdefprint_start(_board: LiBoard) ->bool:
# Your code herereturnFalse@board.move_handlerdefprint_move(_board: LiBoard, _move: chess.Move) ->bool:
# Your code herereturnFalsewhileTrue:
board.update()
if__name__=='__main__':
args=argparse.ArgumentParser(parents=[ARGUMENT_PARSER]).parse_args()
try:
main(args)
exceptKeyboardInterrupt:
pass

Dependencies

Releases

Packages

Contributors

Languages