bishbosh-0.1.1.0: Plays chess.
Safe HaskellNone
LanguageHaskell2010

BishBosh.Component.CastlingMove

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Defines all possible castling-moves.
Synopsis

Types

Data-types

data CastlingMove x y Source #

Defines a castling-move.

Constants

kingsMoveLength :: Num x => x Source #

The constant number of files over which the King always travels when castling.

Functions

getLongAndShortMoves :: (Enum x, Enum y, Eq y, Ord x) => LogicalColour -> (CastlingMove x y, CastlingMove x y) Source #

Break-down the two castling-moves for the specified logical colour into a long & a short castling-move.

Accessors

getCastlingMoves :: (Enum x, Enum y, Eq y, Ord x) => LogicalColour -> [CastlingMove x y] Source #

  • Accessor.
  • CAVEAT: the moves are returned in unspecified order.