bishbosh-0.0.0.6: Plays chess.

Safe HaskellNone
LanguageHaskell2010

BishBosh.State.Position

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
  • Defines the state of the game, without regard to how it arrived there; https://chessprogramming.wikispaces.com/Chess+Position.
  • Games with the same position have the same opportunities.
  • N.B.: pieces are fungible, i.e. they lack identity, so the location of identical pieces may be exchanged, without altering the position.
Synopsis

Types

Data-types

data Position x y Source #

Instances
(Ix x, Enum x, Enum y, Ord y) => Hashable2D Position x y Source # 
Instance details

Defined in BishBosh.State.Position

Methods

listRandoms2D :: Position x y -> Zobrist x y positionHash -> [positionHash] Source #

(Enum x, Enum y, Ord x, Ord y) => Eq (Position x y) Source # 
Instance details

Defined in BishBosh.State.Position

Methods

(==) :: Position x y -> Position x y -> Bool #

(/=) :: Position x y -> Position x y -> Bool #

(Enum x, Enum y, Ord x, Ord y) => Ord (Position x y) Source # 
Instance details

Defined in BishBosh.State.Position

Methods

compare :: Position x y -> Position x y -> Ordering #

(<) :: Position x y -> Position x y -> Bool #

(<=) :: Position x y -> Position x y -> Bool #

(>) :: Position x y -> Position x y -> Bool #

(>=) :: Position x y -> Position x y -> Bool #

max :: Position x y -> Position x y -> Position x y #

min :: Position x y -> Position x y -> Position x y #

(NFData x, NFData y) => NFData (Position x y) Source # 
Instance details

Defined in BishBosh.State.Position

Methods

rnf :: Position x y -> () #

(Enum x, Enum y, Ord x, Ord y) => ReflectableOnX (Position x y) Source # 
Instance details

Defined in BishBosh.State.Position

Methods

reflectOnX :: Position x y -> Position x y Source #

Functions

Constructors

mkPosition Source #

Arguments

:: (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.