bishbosh-0.0.0.3: Plays chess.

Safe HaskellNone
LanguageHaskell2010

BishBosh.State.TurnsByLogicalColour

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
The ordered sequence of turns made by the players of each logical colour.

Synopsis

Types

Type-synonyms

Data-types

Functions

inferNextLogicalColour :: TurnsByLogicalColour turn -> LogicalColour Source #

  • Derive the logical colour of the next player to move.
  • CAVEAT: the result can't be guaranteed if reflectOnX has been called.

countPlies :: TurnsByLogicalColour turn -> NPlies Source #

  • Count the number of plies.
  • N.B.: getNPlies is more efficient.

dereference :: LogicalColour -> TurnsByLogicalColour turn -> [turn] Source #

Dereference.

Constructors

fromAssocs :: Show turn => [(LogicalColour, [turn])] -> TurnsByLogicalColour turn Source #

Smart constructor.

Mutators

prepend :: LogicalColour -> turn -> Transformation turn Source #

Prepend the specified turn.