bishbosh-0.0.0.3: Plays chess.

Safe HaskellNone
LanguageHaskell2010

BishBosh.Notation.MoveNotation

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Implements various move-notations Chess-notation.

Synopsis

Type-classes

class ShowNotation a where Source #

An interface for types which can be rendered in a chess-notation.

Minimal complete definition

showsNotation

class ShowNotationFloat a where Source #

An alternative to ShowFloat, which permits access to a specific move-notation.

Minimal complete definition

showsNotationFloat

Instances

(Enum x, Enum y, Real criterionValue, Real weightedMean) => ShowNotationFloat (QuantifiedGame x y criterionValue weightedMean) Source # 

Methods

showsNotationFloat :: MoveNotation -> (Double -> ShowS) -> QuantifiedGame x y criterionValue weightedMean -> ShowS Source #

(Enum x, Enum y, Real weightedMean) => ShowNotationFloat (PositionHashQuantifiedGameTree x y positionHash criterionValue weightedMean) Source # 

Methods

showsNotationFloat :: MoveNotation -> (Double -> ShowS) -> PositionHashQuantifiedGameTree x y positionHash criterionValue weightedMean -> ShowS Source #

(Enum x, Enum y, Real weightedMean) => ShowNotationFloat (NodeLabel x y positionHash criterionValue weightedMean) Source # 

Methods

showsNotationFloat :: MoveNotation -> (Double -> ShowS) -> NodeLabel x y positionHash criterionValue weightedMean -> ShowS Source #

(Enum x, Enum y, Real criterionValue, Real weightedMean) => ShowNotationFloat (Result x y positionHash criterionValue weightedMean) Source # 

Methods

showsNotationFloat :: MoveNotation -> (Double -> ShowS) -> Result x y positionHash criterionValue weightedMean -> ShowS Source #

Types

Data-types

data MoveNotation Source #

  • Identifies the move-notations which can be used.
  • Standard Algebraic isn't included here because conversion to or from a QualifiedMove requires access to the game.

Constants

tag :: String Source #

Used to qualify XML.

range :: [MoveNotation] Source #

The constant complete range of values.

Functions

readsQualifiedMove :: (Enum x, Enum y, Ord x, Ord y) => MoveNotation -> ReadS (EitherQualifiedMove x y) Source #

Reads a move & move-type from the specified MoveNotation.

showNotation :: ShowNotation a => MoveNotation -> a -> String Source #

Show an arbitrary datum using the specified notation.

showsMoveSyntax :: MoveNotation -> ShowS Source #

Show the syntax required by a specific MoveNotation.

getOrigin :: MoveNotation -> (Int, Int) Source #

Returns the origin of the specified coordinate-system.

showsNotationFloatToNDecimals :: ShowNotationFloat a => MoveNotation -> NDecimalDigits -> a -> ShowS Source #

Render the specified data in the specified notation, & to the specified number of decimal digits.

Predicates