bishbosh-0.1.4.0: Plays chess.
Safe HaskellSafe-Inferred
LanguageHaskell2010

BishBosh.Property.Orientated

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
An interface for vector-like data which is orientated to the edges of the board.
Synopsis

Type-classes

class Orientated a where Source #

  • An interface for vector-like data.
  • CAVEAT: the default implementations are mutually dependent, & could result in infinite recursion.

Minimal complete definition

Nothing

Methods

isVertical Source #

Arguments

:: a 
-> Bool

Whether the datum is aligned with a file of the board.

isHorizontal Source #

Arguments

:: a 
-> Bool

Whether the datum is aligned with a rank of the board.

isParallel Source #

Arguments

:: a 
-> Bool

Whether it is parallel to an edge of the board.

isDiagonal Source #

Arguments

:: a 
-> Bool

Whether it is diagonal (45 degrees) wrt the edges of the board.

isStraight :: a -> Bool Source #

Instances

Instances details
Orientated Parallel Source # 
Instance details

Defined in BishBosh.Direction.Parallel

Orientated Diagonal Source # 
Instance details

Defined in BishBosh.Direction.Diagonal

Orientated Direction Source # 
Instance details

Defined in BishBosh.Direction.Direction

Orientated Vector Source # 
Instance details

Defined in BishBosh.Cartesian.Vector

Orientated Move Source # 
Instance details

Defined in BishBosh.Component.Move

(Orientated l, Orientated r) => Orientated (Either l r) Source # 
Instance details

Defined in BishBosh.Property.Orientated