Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Sum the relative values of rank of piece, based on their location on the board, at a specific stage in the game.
Synopsis
- class Accountant accountant where
- sumPieceSquareValueByLogicalColour :: Num pieceSquareValue => PieceSquareByCoordinatesByRank pieceSquareValue -> NPieces -> accountant -> [pieceSquareValue]
Type-classes
class Accountant accountant where Source #
An interface which may be implemented by data which can total piece-square values.
sumPieceSquareValueByLogicalColour Source #
:: Num pieceSquareValue | |
=> PieceSquareByCoordinatesByRank pieceSquareValue | |
-> NPieces | The number of pieces (of any logical colour or rank) remaining on the board; used to gauge progress through the game. |
-> accountant | |
-> [pieceSquareValue] |
Calculate the total value of the coordinates occupied by the pieces of either side.
Instances
Accountant MaybePieceByCoordinates Source # | |
Defined in BishBosh.State.MaybePieceByCoordinates sumPieceSquareValueByLogicalColour :: Num pieceSquareValue => PieceSquareByCoordinatesByRank pieceSquareValue -> NPieces -> MaybePieceByCoordinates -> [pieceSquareValue] Source # | |
Accountant CoordinatesByRankByLogicalColour Source # | |
Defined in BishBosh.State.CoordinatesByRankByLogicalColour sumPieceSquareValueByLogicalColour :: Num pieceSquareValue => PieceSquareByCoordinatesByRank pieceSquareValue -> NPieces -> CoordinatesByRankByLogicalColour -> [pieceSquareValue] Source # |