| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
BishBosh.State.Censor
Contents
Description
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.
Minimal complete definition
countPiecesByLogicalColour, countPieceDifferenceByRank, hasInsufficientMaterial, hasBothKings
Methods
countPiecesByLogicalColour Source #
Arguments
| :: censor | |
| -> NPieces | The total number of pieces on the board. |
countPieceDifferenceByRank Source #
Arguments
| :: censor | |
| -> NPiecesByRank | Finds the difference between the number of pieces of each rank held by each side. N.B. for this purpose, |
hasInsufficientMaterial Source #
Arguments
| :: censor | |
| -> Bool | Whether insufficient material remains on the board, to force check-mate; https://en.wikipedia.org/wiki/Draw_(chess). |
Arguments
| :: censor | |
| -> Bool | Whether there's exactly one |