Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- https://en.wikipedia.org/wiki/Algebraic_notation_(chess)
Synopsis
- type ValidateMoves = Bool
- type ExplicitEnPassant = Bool
- data StandardAlgebraic
- showsTurn :: ExplicitEnPassant -> Turn -> Game -> ShowS
- showTurn :: ExplicitEnPassant -> Turn -> Game -> String
- showsMove :: ExplicitEnPassant -> QualifiedMove -> Game -> ShowS
- showMove :: ExplicitEnPassant -> QualifiedMove -> Game -> String
- movePiece :: StandardAlgebraic -> Transformation
- parser :: ExplicitEnPassant -> ValidateMoves -> Game -> TextParser StandardAlgebraic
- fromRank :: Rank -> Char
- toRank :: Char -> Rank
- fromQualifiedMove :: QualifiedMove -> StandardAlgebraic
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.
Instances
Eq StandardAlgebraic Source # | |
Defined in BishBosh.ContextualNotation.StandardAlgebraic (==) :: StandardAlgebraic -> StandardAlgebraic -> Bool # (/=) :: StandardAlgebraic -> StandardAlgebraic -> Bool # | |
Show StandardAlgebraic Source # | |
Defined in BishBosh.ContextualNotation.StandardAlgebraic showsPrec :: Int -> StandardAlgebraic -> ShowS # show :: StandardAlgebraic -> String # showList :: [StandardAlgebraic] -> ShowS # |
Constants
Functions
:: ExplicitEnPassant | |
-> Turn | |
-> Game | The game prior to application of the specified turn. |
-> ShowS |
Represent the specified turn in SAN.
:: 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
.
showMove :: ExplicitEnPassant -> QualifiedMove -> Game -> String Source #
Calls showsMove
.
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.
Constructors
fromQualifiedMove :: QualifiedMove -> StandardAlgebraic Source #
Constructor.