Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines the values of a single unspecified piece, of occupying various coordinates.
Synopsis
- data PieceSquareValueByCoordinates
- dereference :: PieceSquareValueByCoordinates -> Coordinates -> PieceSquareValue
- getPieceSquareValue :: PieceSquareValueByCoordinates -> LogicalColour -> Coordinates -> PieceSquareValue
- toList :: PieceSquareValueByCoordinates -> [PieceSquareValue]
- fromList :: [PieceSquareValue] -> PieceSquareValueByCoordinates
Types
Type-synonyms
Data-types
data PieceSquareValueByCoordinates Source #
The piece-square value varies with coordinates at which the unspecified piece is located.
Instances
Functions
Accessors
dereference :: PieceSquareValueByCoordinates -> Coordinates -> PieceSquareValue Source #
Extract the value for the specified coordinates (from White
's perspective).
:: PieceSquareValueByCoordinates | |
-> LogicalColour | The piece's logical colour. |
-> Coordinates | The piece's location. |
-> PieceSquareValue |
- Get the piece-square value, for the specified coordinates.
- Utilises symmetry to infer values for
Black
, by reflecting the specified coordinates intoWhite
's domain.
toList :: PieceSquareValueByCoordinates -> [PieceSquareValue] Source #
Deconstruct, returning the ordered list from which it was constructed.
Constructors
fromList :: [PieceSquareValue] -> PieceSquareValueByCoordinates Source #
Constructor from a list ordered by coordinates.