hchesslib-0.2.0.0: Chess library
CopyrightMiika-Petteri Matikainen 2021
LicenseGPL-2
Maintainermiikapetteri@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe-Inferred
LanguageHaskell2010

Chess.UI

Description

Visualize chess games

Synopsis

Documentation

printBoard :: Board -> String Source #

Prints the board in ASCII.

Example for the initial position: @

8 | r | n | b | q | k | b | n | r | +---+---+---+---+---+---+---+---+ 7 | p | p | p | p | p | p | p | p | +---+---+---+---+---+---+---+---+ 6 | | | | | | | | | +---+---+---+---+---+---+---+---+ 5 | | | | | | | | | +---+---+---+---+---+---+---+---+ 4 | | | | | | | | | +---+---+---+---+---+---+---+---+ 3 | | | | | | | | | +---+---+---+---+---+---+---+---+ 2 | P | P | P | P | P | P | P | P | +---+---+---+---+---+---+---+---+ 1 | R | N | B | Q | K | B | N | R | +---+---+---+---+---+---+---+---+ a b c d e f g h @

coordinateNotation :: Move -> String Source #

Prints the move in coordinate notation. E.g. "e2-e4", "g1-g3", "b2-c1q"