Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Describes the y-axis by which the board is indexed.
- N.B. this coordinate-system is for internal use only, and doesn't attempt to replicate any standard Chess-notation.
- yOrigin :: Int
- yLength :: Distance
- yMin :: Enum y => y
- yMax :: Enum y => y
- yRange :: Enum y => [y]
- centre :: Fractional centre => centre
- 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
Constants
centre :: Fractional centre => centre Source #
- The constant centre of the span.
- CAVEAT: no square actually exists at this fractional value.
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.