Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Describes the x-axis by which the board is indexed.
- AKA the file of a piece.
- N.B. this coordinate-system is for internal use only, and doesn't attempt to replicate any standard chess-notation.
Synopsis
- type ArrayByAbscissa x = Array x
- xOrigin :: Int
- xLength :: Distance
- xMin :: Enum x => x
- xMax :: Enum x => x
- xBounds :: Enum x => (x, x)
- xRange :: Enum x => [x]
- toIx :: Enum x => x -> Int
- fromIx :: Enum x => Int -> x
- reflect :: Enum x => x -> x
- translate :: (Enum x, Ord x) => (x -> x) -> x -> x
- maybeTranslate :: (Enum x, Ord x) => (x -> x) -> x -> Maybe x
- getAdjacents :: (Enum x, Eq x) => x -> [x]
- listArrayByAbscissa :: (IArray a e, Ix x, Enum x) => [e] -> a x e
- inBounds :: (Enum x, Ord x) => x -> Bool
Types
type ArrayByAbscissa x = Array x Source #
A boxed array indexed by coordinates, of arbitrary elements.
Constants
Functions
maybeTranslate :: (Enum x, Ord x) => (x -> x) -> x -> Maybe x Source #
Where legal, translate the specified abscissa.
getAdjacents :: (Enum x, Eq x) => x -> [x] Source #
Get the abscissae immediately left & right.