Copyright | Miika-Petteri Matikainen 2021 |
---|---|
License | GPL-2 |
Maintainer | miikapetteri@gmail.com |
Stability | experimental |
Portability | unknown |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Visualize chess games
Synopsis
- printBoard :: Board -> String
- coordinateNotation :: Move -> String
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"