bishbosh-0.0.0.6: Plays chess.

Safe HaskellNone
LanguageHaskell2010

BishBosh.Component.PieceSquareArray

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Defines the relative value of a specific rank of piece, occupying a specific coordinate on the board, at a specific stage in the game.
Synopsis

Types

Type-synonyms

type InterpolatedPieceSquareValues pieceSquareValue = Either pieceSquareValue (Array NPieces pieceSquareValue) Source #

Either a single pieceSquareValue or an array of values indexed by the total number of pieces remaining on the board.

type FindPieceSquareValue x y pieceSquareValue Source #

Arguments

 = LogicalColour

The piece's logical colour.

-> Rank

The piece's rank.

-> Coordinates x y

The piece's location.

-> pieceSquareValue 

The type of a function which can find the appropriate piece-square value.

Data-types

data PieceSquareArray x y pieceSquareValue Source #

The value for each type of piece of occupying each coordinate, at each stage in the lifetime of the game.

Instances
(Enum x, Enum y, Ord x, Ord y, Eq pieceSquareValue) => Eq (PieceSquareArray x y pieceSquareValue) Source # 
Instance details

Defined in BishBosh.Component.PieceSquareArray

Methods

(==) :: PieceSquareArray x y pieceSquareValue -> PieceSquareArray x y pieceSquareValue -> Bool #

(/=) :: PieceSquareArray x y pieceSquareValue -> PieceSquareArray x y pieceSquareValue -> Bool #

(Enum x, Enum y, Ord x, Ord y, Show x, Show y, Show pieceSquareValue) => Show (PieceSquareArray x y pieceSquareValue) Source # 
Instance details

Defined in BishBosh.Component.PieceSquareArray

Methods

showsPrec :: Int -> PieceSquareArray x y pieceSquareValue -> ShowS #

show :: PieceSquareArray x y pieceSquareValue -> String #

showList :: [PieceSquareArray x y pieceSquareValue] -> ShowS #

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

Defined in BishBosh.Component.PieceSquareArray

Methods

rnf :: PieceSquareArray x y pieceSquareValue -> () #

Functions

findPieceSquareValue Source #

Arguments

:: (Enum x, Enum y, Ord x, Ord y) 
=> NPieces

The progress through the game.

-> LogicalColour

The piece's logical colour.

-> Rank

The piece's rank.

-> Coordinates x y

The piece's location.

-> PieceSquareArray x y pieceSquareValue 
-> pieceSquareValue 

Find the piece-square value, at a stage in the game's lifetime defined by the total number of piece remaining, for the specified piece & coordinates.

Constructor

mkPieceSquareArray :: (Rank -> InterpolatedPieceSquareValuesByCoordinates x y pieceSquareValue) -> PieceSquareArray x y pieceSquareValue Source #

Constructor.