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.
Synopsis
- 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.
Instances
(Enum x, Enum y, Ord x, Ord y, Eq pieceSquareValue) => Eq (PieceSquareArray x y pieceSquareValue) Source # | |
Defined in BishBosh.Component.PieceSquareArray (==) :: PieceSquareArray x y pieceSquareValue -> PieceSquareArray x y pieceSquareValue -> Bool # (/=) :: PieceSquareArray x y pieceSquareValue -> PieceSquareArray x y pieceSquareValue -> Bool # | |
(Enum x, Enum y, Ord x, Ord y, Show x, Show y, Show pieceSquareValue) => Show (PieceSquareArray x y pieceSquareValue) Source # | |
Defined in BishBosh.Component.PieceSquareArray showsPrec :: Int -> PieceSquareArray x y pieceSquareValue -> ShowS # show :: PieceSquareArray x y pieceSquareValue -> String # showList :: [PieceSquareArray x y pieceSquareValue] -> ShowS # | |
(NFData pieceSquareValue, NFData x, NFData y) => NFData (PieceSquareArray x y pieceSquareValue) Source # | |
Defined in BishBosh.Component.PieceSquareArray rnf :: PieceSquareArray x y pieceSquareValue -> () # |
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.