chessboardCLI

Chessboard generator in command line


Keywords
chessboard
License
MIT
Install
pip install chessboardCLI==1.3.8

Documentation

chessboard

PyPI CocoaPods PyPI

A chessboard module for board games in Linux command-line

Use

pip install chessboardCLI

to install it.

The full docs is provided here.

Useful functions:
  1. Get the sign of an integer: sign = lambda a: (a>0) - (a<0)
  2. In Python 3.4, math.cos(math.pi/2) = xxx*e(-17), a value beyond zero
  3. Coodinate rotation formula (ANTICLOCKWISE):
tx = (x - x0)*cos(theta) - (y - y0)*sin(theta) + x0  
ty = (x - x0)*sin(theta) + (y - y0)*cos(theta) + y0