Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines the data-type which represents the logical (rather than physical) colour of the two players & of pieces.
- N.B.: conceptually different from the logical colour of squares on the board.
Synopsis
- type ByLogicalColour = Array LogicalColour
- data LogicalColour
- range :: [LogicalColour]
- nDistinctLogicalColours :: Int
- listArrayByLogicalColour :: IArray a e => [e] -> a LogicalColour e
- isBlack :: LogicalColour -> Bool
Types
Type-synonyms
type ByLogicalColour = Array LogicalColour Source #
A boxed array indexed by logical colour, of arbitrary elements.
Data-types
data LogicalColour Source #
The logical colour associated with a player or a piece.
Instances
Constants
range :: [LogicalColour] Source #
The constant ascending range of logical colours.
nDistinctLogicalColours :: Int Source #
The constant number of distinct logical colours.
Functions
Constructor
listArrayByLogicalColour :: IArray a e => [e] -> a LogicalColour e Source #
Array-constructor.
Predicates
isBlack :: LogicalColour -> Bool Source #
Whether the specified logical colour is Black
.