Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Describes the y-axis by which the board is indexed.
- AKA the rank of a piece.
- N.B. this coordinate-system is for internal use only, and doesn't attempt to replicate any standard chess-notation.
Synopsis
- yLength :: Y
- yMin :: Y
- yMax :: Y
- yBounds :: (Y, Y)
- yRange :: [Y]
- toIx :: Y -> Int
- fromIx :: Int -> Y
- firstRank :: LogicalColour -> Y
- lastRank :: LogicalColour -> Y
- pawnsFirstRank :: LogicalColour -> Y
- enPassantRank :: LogicalColour -> Y
- reflect :: Y -> Y
- translate :: (Y -> Y) -> Y -> Y
- maybeTranslate :: (Y -> Y) -> Y -> Maybe Y
- inBounds :: Y -> Bool
Constants
Functions
firstRank :: LogicalColour -> Y Source #
The rank from which pieces conventionally start.
lastRank :: LogicalColour -> Y Source #
The final rank; i.e. the one on which a Pawn
is promoted.
pawnsFirstRank :: LogicalColour -> Y Source #
The rank from which Pawn
s conventionally start.
enPassantRank :: LogicalColour -> Y Source #
The rank from which a Pawn
may capture en-passant.