bishbosh-0.0.0.1: Plays chess.

Safe HaskellSafe
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.

Minimal complete definition

isDiagonal, isParallel

Methods

isDiagonal Source #

Arguments

:: a 
-> Bool

Whether it is diagonal wrt the edges of the board.

isParallel Source #

Arguments

:: a 
-> Bool

Whether it is parallel to an edge of the board.

isStraight :: a -> Bool Source #

Instances

Orientated Direction Source # 
(Eq distance, Num distance) => Orientated (Vector distance) Source # 

Methods

isDiagonal :: Vector distance -> Bool Source #

isParallel :: Vector distance -> Bool Source #

isStraight :: Vector distance -> Bool Source #

(Enum x, Enum y) => Orientated (Move x y) Source #