bishbosh-0.0.0.6: Plays chess.

Safe HaskellNone
LanguageHaskell2010

BishBosh.Model.GameTerminationReason

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
  • Itemises the various reasons for terminating a game.
  • Each reason corresponds to a rule in chess.
Synopsis

Types

Data-types

Function

toResult :: GameTerminationReason -> Result Source #

Convert to a result.

Constructors

Predicates

isCheckMateBy :: LogicalColour -> GameTerminationReason -> Bool Source #

Whether the game was won by the specified player.

isCheckMate :: GameTerminationReason -> Bool Source #

Whether the game terminated in check-mate.

isResignation :: GameTerminationReason -> Bool Source #

Whether the game was resigned.

isDraw :: GameTerminationReason -> Bool Source #

Whether the game was drawn.