Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Maintains a census of the pieces on the board, without regard to their location.
- type NPiecesByRank = ByRank NPieces
- class Censor censor where
Types
Type-synonyms
type NPiecesByRank = ByRank NPieces Source #
The difference in the number of pieces of each rank held by either side.
Type-classes
class Censor censor where Source #
An interface which may be implemented by data which can perform a census of the pieces on the board.
countPiecesByLogicalColour Source #
:: censor | |
-> NPieces | The total number of pieces on the board. |
countPieceDifferenceByRank Source #
:: censor | |
-> NPiecesByRank | Finds the difference between the number of pieces of each rank held by each side. N.B. for this purpose, |
hasInsufficientMaterial Source #
:: censor | |
-> Bool | Whether insufficient material remains on the board, to force check-mate; https://en.wikipedia.org/wiki/Draw_(chess). |
:: censor | |
-> Bool | Whether there's exactly one |