bishbosh-0.0.0.5: Plays chess.

BishBosh.Property.Rotatable

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
• An interface for data which can be transformed by rotation.
• CAVEAT: only rotations in discrete 90-degrees steps are considered.
Synopsis

# Type-classes

class (ReflectableOnX a, ReflectableOnY a) => Rotatable a where Source #

An interface which data which can be transformed by rotation, may implement.

Minimal complete definition

Methods

Arguments

 :: a -> a Rotate anticlockwise by 90 degrees, so that N becomes W.

Arguments

 :: a -> a Rotate by 180 degrees.

Arguments

 :: a -> a Rotate clockwise by 90 degrees, so that N becomes E.
Instances
 (Enum x, Enum y) => Rotatable (Coordinates x y) Source # Instance detailsDefined in BishBosh.Cartesian.Coordinates Methodsrotate90 :: Coordinates x y -> Coordinates x y Source #rotate180 :: Coordinates x y -> Coordinates x y Source #rotate270 :: Coordinates x y -> Coordinates x y Source #