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

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

Nothing

Methods

rotate90 Source #

Arguments

:: a 
-> a

Rotate anticlockwise by 90 degrees, so that N becomes W.

rotate180 Source #

Arguments

:: a 
-> a

Rotate by 180 degrees.

rotate270 Source #

Arguments

:: a 
-> a

Rotate clockwise by 90 degrees, so that N becomes E.