Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines the type returned when reading a move encoded in a string, using any of a variety of notations.
- The internal representation of a move is merely a pair of coordinates, but in various chess-notations, additional information is provided.
- The quantity of additional information is dependent of the specific notation:
some identify Castling, En-passant, promotion rank, taken rank;
some merely define the rank to which a
Pawn
should be promoted.
- data EitherQualifiedMove x y
- mkPartiallyQualifiedMove :: Move x y -> Maybe Rank -> EitherQualifiedMove x y
- mkFullyQualifiedMove :: Move x y -> MoveType -> EitherQualifiedMove x y
Types
Data-types
data EitherQualifiedMove x y Source #
As returned by readsQualifiedMove
.
Functions
Constructors
mkPartiallyQualifiedMove :: Move x y -> Maybe Rank -> EitherQualifiedMove x y Source #
Constructor for notations which don't encode sufficient information to reliably re-construct the move-type, but merely the rank to which a Pawn
is to be promoted.
mkFullyQualifiedMove :: Move x y -> MoveType -> EitherQualifiedMove x y Source #
Constructor for notations which encode sufficient information to reliably re-construct the move-type.