Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines the relative value of a specific rank of piece, occupying a specific coordinate on the board, at a specific stage in the game.
- type InterpolatedPieceSquareValues pieceSquareValue = Either pieceSquareValue (Array NPieces pieceSquareValue)
- type FindPieceSquareValue x y pieceSquareValue = LogicalColour -> Rank -> Coordinates x y -> pieceSquareValue
- data PieceSquareArray x y pieceSquareValue
- findPieceSquareValue :: (Enum x, Enum y, Ord x, Ord y) => NPieces -> LogicalColour -> Rank -> Coordinates x y -> PieceSquareArray x y pieceSquareValue -> pieceSquareValue
- mkPieceSquareArray :: (Rank -> InterpolatedPieceSquareValuesByCoordinates x y pieceSquareValue) -> PieceSquareArray x y pieceSquareValue
Types
Type-synonyms
type InterpolatedPieceSquareValues pieceSquareValue = Either pieceSquareValue (Array NPieces pieceSquareValue) Source #
Either a single pieceSquareValue or an array of values indexed by the total number of pieces remaining on the board.
type FindPieceSquareValue x y pieceSquareValue Source #
= LogicalColour | The piece's logical colour. |
-> Rank | The piece's rank. |
-> Coordinates x y | The piece's location. |
-> pieceSquareValue |
The type of a function which can find the appropriate piece-square value.
Data-types
data PieceSquareArray x y pieceSquareValue Source #
The value for each type of piece of occupying each coordinate, at each stage in the lifetime of the game.
(Eq pieceSquareValue, Ord y, Ord x, Enum y, Enum x) => Eq (PieceSquareArray x y pieceSquareValue) Source # | |
(Show pieceSquareValue, Show y, Show x, Ord y, Ord x, Enum y, Enum x) => Show (PieceSquareArray x y pieceSquareValue) Source # | |
(NFData pieceSquareValue, NFData x, NFData y) => NFData (PieceSquareArray x y pieceSquareValue) Source # | |
Functions
:: (Enum x, Enum y, Ord x, Ord y) | |
=> NPieces | The progress through the game. |
-> LogicalColour | The piece's logical colour. |
-> Rank | The piece's rank. |
-> Coordinates x y | The piece's location. |
-> PieceSquareArray x y pieceSquareValue | |
-> pieceSquareValue |
Find the piece-square value, at a stage in the game's lifetime defined by the total number of piece remaining, for the specified piece & coordinates.
Constructor
mkPieceSquareArray :: (Rank -> InterpolatedPieceSquareValuesByCoordinates x y pieceSquareValue) -> PieceSquareArray x y pieceSquareValue Source #
Constructor.