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
- yOrigin :: Int
- yLength :: Distance
- yMin :: Enum y => y
- yMax :: Enum y => y
- yBounds :: Enum y => (y, y)
- yRange :: Enum y => [y]
- toIx :: Enum y => y -> Int
- fromIx :: Enum y => Int -> y
- firstRank :: Enum y => LogicalColour -> y
- lastRank :: Enum y => LogicalColour -> y
- pawnsFirstRank :: Enum y => LogicalColour -> y
- enPassantRank :: Enum y => LogicalColour -> y
- reflect :: Enum y => y -> y
- translate :: (Enum y, Ord y) => (y -> y) -> y -> y
- maybeTranslate :: (Enum y, Ord y) => (y -> y) -> y -> Maybe y
- inBounds :: (Enum y, Ord y) => y -> Bool
Types
Constants
Functions
firstRank :: Enum y => LogicalColour -> y Source #
The rank from which pieces conventionally start.
lastRank :: Enum y => LogicalColour -> y Source #
The final rank; i.e. the one on which a Pawn
is promoted.
pawnsFirstRank :: Enum y => LogicalColour -> y Source #
The rank from which Pawn
s conventionally start.
enPassantRank :: Enum y => LogicalColour -> y Source #
The rank from which a Pawn
may capture en-passant.
maybeTranslate :: (Enum y, Ord y) => (y -> y) -> y -> Maybe y Source #
Where legal, translate the specified ordinate.