Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- https://www.chessprogramming.org/Algebraic_Chess_Notation#Pure_coordinate_notation.
- CAVEAT: https://en.wikipedia.org/wiki/Chess_notation defined a variant of this notation.
- N.B.: used for communication via CECP with xboard.
- N.B.: this minimal notation defines the coordinate-system on which Standard Algebraic is based.
Synopsis
- data PureCoordinate
- notation :: Notation
- regexSyntax :: String
- abscissaParser :: TextParser X
- ordinateParser :: TextParser Y
- coordinatesParser :: TextParser Coordinates
- mkPureCoordinate :: Move -> Maybe Rank -> PureCoordinate
- mkPureCoordinate' :: Promotable promotable => Move -> promotable -> PureCoordinate
Types
Data-types
data PureCoordinate Source #
Defines a move, to enable io in PureCoordinate/-notation.
Instances
Eq PureCoordinate Source # | |
Defined in BishBosh.Notation.PureCoordinate (==) :: PureCoordinate -> PureCoordinate -> Bool # (/=) :: PureCoordinate -> PureCoordinate -> Bool # | |
Read PureCoordinate Source # | |
Defined in BishBosh.Notation.PureCoordinate readsPrec :: Int -> ReadS PureCoordinate # readList :: ReadS [PureCoordinate] # | |
Show PureCoordinate Source # | |
Defined in BishBosh.Notation.PureCoordinate showsPrec :: Int -> PureCoordinate -> ShowS # show :: PureCoordinate -> String # showList :: [PureCoordinate] -> ShowS # | |
Promotable PureCoordinate Source # | |
Defined in BishBosh.Notation.PureCoordinate |
Constants
Define the parameters of the notation, using the minimum permissible values for x & y coordinates.
regexSyntax :: String Source #
Defines using a regex, the required syntax.
Functions
abscissaParser :: TextParser X Source #
Parse an x-coordinate.
ordinateParser :: TextParser Y Source #
Parse a y-coordinate.
coordinatesParser :: TextParser Coordinates Source #
Parse a pair of coordinates.
Constructors
:: Move | |
-> Maybe Rank | The optional promotion-rank. |
-> PureCoordinate |
Smart constructor.
:: Promotable promotable | |
=> Move | |
-> promotable | The datum from which to extract the optional promotion-rank. |
-> PureCoordinate |
Smart constructor.