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 x y
- showsCoordinates :: (Enum x, Enum y) => Coordinates x y -> ShowS
- showsTurn :: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) => ExplicitEnPassant -> Turn x y -> Game x y -> ShowS
- showTurn :: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) => ExplicitEnPassant -> Turn x y -> Game x y -> String
- showsMove :: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) => ExplicitEnPassant -> QualifiedMove x y -> Game x y -> ShowS
- showMove :: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) => ExplicitEnPassant -> QualifiedMove x y -> Game x y -> String
- movePiece :: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) => StandardAlgebraic x y -> Transformation x y
- parser :: (Enum x, Enum y, Ord x, Ord y, Show x, Show y) => ExplicitEnPassant -> ValidateMoves -> Game x y -> TextParser (StandardAlgebraic x y)
- fromRank :: Rank -> Char
- toRank :: Char -> Rank
- fromQualifiedMove :: QualifiedMove x y -> StandardAlgebraic x y
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.
Instances
(Eq x, Eq y) => Eq (StandardAlgebraic x y) Source # | |
Defined in BishBosh.ContextualNotation.StandardAlgebraic (==) :: StandardAlgebraic x y -> StandardAlgebraic x y -> Bool # (/=) :: StandardAlgebraic x y -> StandardAlgebraic x y -> Bool # | |
(Show x, Show y) => Show (StandardAlgebraic x y) Source # | |
Defined in BishBosh.ContextualNotation.StandardAlgebraic showsPrec :: Int -> StandardAlgebraic x y -> ShowS # show :: StandardAlgebraic x y -> String # showList :: [StandardAlgebraic x y] -> ShowS # |
Constants
Functions
showsCoordinates :: (Enum x, Enum y) => Coordinates x y -> ShowS Source #
Shows the specified coordinates.
:: (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.
:: (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.
Constructors
fromQualifiedMove :: QualifiedMove x y -> StandardAlgebraic x y Source #
Constructor.