Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines all possible castling-moves.
Synopsis
- data CastlingMove x y
- kingsMoveLength :: Num x => x
- getLongAndShortMoves :: (Enum x, Enum y, Eq y, Ord x) => LogicalColour -> (CastlingMove x y, CastlingMove x y)
- getCastlingMoves :: (Enum x, Enum y, Eq y, Ord x) => LogicalColour -> [CastlingMove x y]
Types
Data-types
data CastlingMove x y Source #
Defines a castling-move.
Constants
kingsMoveLength :: Num x => x Source #
The constant number of files over which the King always travels when castling.
Functions
getLongAndShortMoves :: (Enum x, Enum y, Eq y, Ord x) => LogicalColour -> (CastlingMove x y, CastlingMove x y) Source #
Break-down the two castling-moves for the specified logical colour into a long & a short castling-move.
Accessors
getCastlingMoves :: (Enum x, Enum y, Eq y, Ord x) => LogicalColour -> [CastlingMove x y] Source #
- Accessor.
- CAVEAT: the moves are returned in unspecified order.