bishbosh-0.0.0.2: Plays chess.

Safe HaskellNone
LanguageHaskell2010

BishBosh.ContextualNotation.StandardAlgebraic

Contents

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 x y Source #

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

Constants

Functions

showsCoordinates :: (Enum x, Enum y) => Coordinates x y -> ShowS Source #

Shows the specified coordinates.

showsTurn Source #

Arguments

:: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) 
=> ExplicitEnPassant 
-> Turn x y 
-> Game x y

The game prior to application of the specified turn.

-> ShowS 

Represent the specified turn in SAN.

showTurn Source #

Arguments

:: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) 
=> ExplicitEnPassant 
-> Turn x y 
-> Game x y

The game prior to application of the specified turn.

-> String 

Calls showsTurn.

showsMove :: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) => ExplicitEnPassant -> QualifiedMove x y -> Game x y -> ShowS Source #

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

showMove :: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) => ExplicitEnPassant -> QualifiedMove x y -> Game x y -> String Source #

Calls showsMove.

movePiece :: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) => StandardAlgebraic x y -> Transformation x y Source #

Applies the specified move to the specified game.

parser :: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) => ExplicitEnPassant -> ValidateMoves -> Game x y -> TextParser (StandardAlgebraic x y) 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

Predicates