| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
BishBosh.Component.PieceSquareValueByCoordinates
Description
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
| Eq PieceSquareValueByCoordinates Source # | |
| Show PieceSquareValueByCoordinates Source # | |
Defined in BishBosh.Component.PieceSquareValueByCoordinates Methods showsPrec :: Int -> PieceSquareValueByCoordinates -> ShowS # show :: PieceSquareValueByCoordinates -> String # showList :: [PieceSquareValueByCoordinates] -> ShowS # | |
| NFData PieceSquareValueByCoordinates Source # | |
Defined in BishBosh.Component.PieceSquareValueByCoordinates Methods rnf :: PieceSquareValueByCoordinates -> () # | |
Functions
Accessors
dereference :: PieceSquareValueByCoordinates -> Coordinates -> PieceSquareValue Source #
Extract the value for the specified coordinates (from White's perspective).
Arguments
| :: 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.