Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines the state of the game, without regard to how it arrived there; https://www.chessprogramming.org/Chess_Position.
- Games with the same position may be considered to have converged, since they now have equal opportunity.
- N.B.: pieces are fungible, i.e. they lack identity, so the location of identical pieces may be exchanged, without altering the position.
Synopsis
- data Position x y
- mkPosition :: (Enum x, Enum y, Ord x, Ord y) => LogicalColour -> MaybePieceByCoordinates x y -> CastleableRooksByLogicalColour x -> Maybe (Turn x y) -> Position x y
Types
Data-types
The state of the game, without regard to how it arrived there.
Instances
(Ix x, Enum x, Enum y, Ord y) => Hashable2D Position x y Source # | |
Defined in BishBosh.State.Position listRandoms2D :: Position x y -> Zobrist x y positionHash -> [positionHash] Source # | |
(Enum x, Enum y, Ord x, Ord y) => Eq (Position x y) Source # | |
(Enum x, Enum y, Ord x, Ord y) => Ord (Position x y) Source # | |
Defined in BishBosh.State.Position | |
(NFData x, NFData y) => NFData (Position x y) Source # | |
Defined in BishBosh.State.Position | |
(Enum x, Enum y, Ord x, Ord y) => ReflectableOnX (Position x y) Source # | |
Defined in BishBosh.State.Position reflectOnX :: Position x y -> Position x y Source # |
Functions
Constructors
:: (Enum x, Enum y, Ord x, Ord y) | |
=> LogicalColour | The logical colour of the next player to move. |
-> MaybePieceByCoordinates x y | |
-> CastleableRooksByLogicalColour x | |
-> Maybe (Turn x y) | The last turn made. |
-> Position x y |
Constructor.