Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Describes the x-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.
- type ByAbscissa x = Array x
- xOrigin :: Int
- xLength :: Distance
- xMin :: Enum x => x
- xMax :: Enum x => x
- xRange :: Enum x => [x]
- centre :: Fractional centre => centre
- 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 ByAbscissa x = Array x Source #
A boxed array indexed by coordinates, of arbitrary elements.
Constants
centre :: Fractional centre => centre Source #
- The constant centre of the span.
- CAVEAT: no square actually exists at this fractional value.
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.