Copyright | (c) Mario Lang 2019 |
---|---|
License | BSD3 |
Maintainer | mlang@blind.guru |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
A small collection of data types and functions to represent Chess positions and moves including move generation and parsing from external sources.
This module does deliberately not implement any search or evaluation functionality. It is intended to be used to lay the ground for communicating with other programs or players, hence the package name chessIO.
Representing chess positions
The starting position as given by the FEN string "rnbqkbnrpppppppp8888PPPPPPPP/RNBQKBNR w KQkq - 0 1".
Converting from/to Forsyth-Edwards-Notation
Chess moves
Converting from/to algebraic notation used by the Universal Chess Interface
fromUCI :: String -> Maybe Move Source #
Parse a move in the format used by the Universal Chess Interface protocol.
toUCI :: Move -> String Source #
Convert a move to the format used by the Universal Chess Interface protocol.
Validating that a move is actually legal in a given position
relativeTo :: Position -> Move -> Maybe Move Source #
Validate that a certain move is legal in the given position.