bishbosh-0.1.4.0: Plays chess.
Safe HaskellNone
LanguageHaskell2010

BishBosh.Component.Move

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
  • Defines one move (actually just a half move AKA "ply") of a piece.
  • Similar to Vector, but the position is fixed.
Synopsis

Types

Type-synonyms

data Move Source #

  • A move of a piece.
  • Most modern chess-notations (except Standard Algebraic) start with similar information, but also define ancillary information which is captured in MoveType.

Instances

Instances details
Eq Move Source # 
Instance details

Defined in BishBosh.Component.Move

Methods

(==) :: Move -> Move -> Bool #

(/=) :: Move -> Move -> Bool #

Ord Move Source # 
Instance details

Defined in BishBosh.Component.Move

Methods

compare :: Move -> Move -> Ordering #

(<) :: Move -> Move -> Bool #

(<=) :: Move -> Move -> Bool #

(>) :: Move -> Move -> Bool #

(>=) :: Move -> Move -> Bool #

max :: Move -> Move -> Move #

min :: Move -> Move -> Move #

Read Move Source # 
Instance details

Defined in BishBosh.Component.Move

Show Move Source # 
Instance details

Defined in BishBosh.Component.Move

Methods

showsPrec :: Int -> Move -> ShowS #

show :: Move -> String #

showList :: [Move] -> ShowS #

NFData Move Source # 
Instance details

Defined in BishBosh.Component.Move

Methods

rnf :: Move -> () #

Opposable Move Source # 
Instance details

Defined in BishBosh.Component.Move

Orientated Move Source # 
Instance details

Defined in BishBosh.Component.Move

ReflectableOnY Move Source # 
Instance details

Defined in BishBosh.Component.Move

Methods

reflectOnY :: Move -> Move Source #

ReflectableOnX Move Source # 
Instance details

Defined in BishBosh.Component.Move

Methods

reflectOnX :: Move -> Move Source #

Constants

tag :: String Source #

Used to qualify XML.

nPliesPerMove :: NPlies Source #

The constant number of plies per move.

Functions

measureDistance :: Move -> Vector Source #

Measures the signed distance between the ends of the move.

interpolate :: Move -> QualifiedStraightLine Source #

Generates a line of coordinates covering the half open interval (source, destination].

Constructors

mkMove :: Coordinates -> Coordinates -> Move Source #

Smart constructor.

Predicates

isPawnDoubleAdvance Source #

Arguments

:: Move 
-> LogicalColour

Defines the side whose move is referenced.

-> Bool 
  • Whether the specified move is a Pawn's initial double-advance.
  • CAVEAT: failing this test guarantees that the move isn't a Pawn's double-advance, but passing only guarantees that it is, if it was a Pawn which moved & that the move is valid.