bishbosh-0.1.4.0: Plays chess.
Safe HaskellNone
LanguageHaskell2010

BishBosh.ContextualNotation.StandardAlgebraic

Description

Synopsis

Types

Type-synonyms

type ValidateMoves = Bool Source #

Whether each move should be validated.

type ExplicitEnPassant = Bool Source #

Whether en-passant moves are tagged, or implicit.

Data-types

data StandardAlgebraic Source #

Defines a move, to enable io in StandardAlgebraic/-notation.

Constants

Functions

showsTurn Source #

Arguments

:: ExplicitEnPassant 
-> Turn 
-> Game

The game prior to application of the specified turn.

-> ShowS 

Represent the specified turn in SAN.

showTurn Source #

Arguments

:: ExplicitEnPassant 
-> Turn 
-> Game

The game prior to application of the specified turn.

-> String 

Calls showsTurn.

showsMove :: ExplicitEnPassant -> QualifiedMove -> Game -> ShowS Source #

A convenience-function, which generates the turn required to call showsTurn.

movePiece :: StandardAlgebraic -> Transformation Source #

Applies the specified move to the specified game.

parser :: ExplicitEnPassant -> ValidateMoves -> Game -> TextParser StandardAlgebraic Source #

Parses a move from SAN, & optionally validates it against the specified game.

fromRank :: Rank -> Char Source #

Represent a rank in SAN.

toRank :: Char -> Rank Source #

Translate from SAN to a rank.

Constructors