The Move
and Variation
data types, and miscellaneus functions
operating on moves.
Internal.Move
Type representing a chess move. The move contains information about the from and to square, and whether the move is a castle, an en passant capture, or a pawn promotion.
List Move
Type representing a variation, i.e. a sequence of moves.
from : Move -> Square
The source square of a move.
to : Move -> Square
The destination square of a move.
promotion : Move -> Maybe PieceType
The piece type to which the move promotes, or Nothing
if the move is not
a promotion move.
isPromotion : Move -> Basics.Bool
Whether the move is a pawn promotion
isCastle : Move -> Basics.Bool
Whether the move is a castling move.
isKingsideCastle : Move -> Basics.Bool
Whether the move is a kingside castling move.
isQueensideCastle : Move -> Basics.Bool
Whether the move is a queenside castling move.
isEp : Move -> Basics.Bool
Whether the move is an en passant capture.
toUci : Move -> String
Translate a move to UCI notation. Translating from UCI cannot be done by inspecting the move a lone, since it also requires a board.