hcube-0.1.1: Virtual Rubik's cube of arbitrary size.

Portabilityportable
Stabilityprovisional
Maintainerechbar137@yahoo.co.in
Safe HaskellSafe

HCube.Data

Description

 

Synopsis

Documentation

type Numb = IntSource

Integer type used in hcube.

type Size = NumbSource

Physical size of cube. For example a value of 3 refers to original 3x3x3 Rubik's cube.

type Point = (Numb, Numb)Source

Point is used in transformations of cubies in a two dimensional plane.

type Vec = (Numb, Numb, Numb)Source

Vector which orientation group matrices act on. Also used for calculating new cubie positions.

type ColorTag = StringSource

String with each character representing a color of a physical cubie.

type CubeSurf = [(Side, [Color])]Source

Type used to specify state of physical cube.

data Matrix Source

Matrices in hcube are constructed from column vectors. The third vector is often chosen as the cross product of the first two such that the determinate of the matrix is one.

Constructors

Matrix Vec Vec Vec 

Instances

data Command Source

Used for simplistic processing of console commands.

data View Source

Left and right 3D view of cube.

Constructors

LeftV 
RightV 

Instances

data ViewAssociation Source

Used by Template to map logical structure of cube to display views.

Constructors

Sur (Numb, Side) 
Ide Numb 
Ori Numb 

data Rotation Source

Defines a rotation of an arbitrary cube slice.

data Direction Source

Defines direction of slab movement.

Constructors

Clockwise 
Counter 
Twice 
NoDir 

data Slab Source

Defines an axis for slab movement.

Constructors

Layer 
HSlice 
VSlice 
NoSlab 

Instances

data Side Source

Sides of a cube.

Constructors

UpS 
DownS 
FrontS 
BackS 
LeftS 
RightS 
NoSide 

Instances

data Color Source

Represents the color of a cubie face.

Constructors

White 
Yellow 
Orange 
Red 
Blue 
Green 
NoColor 

Instances

data ActualCube Source

Constructors

ActualCube 

Fields

up :: Color
 
front :: Color
 
down :: Color
 
back :: Color
 
left :: Color
 
right :: Color
 

whiteC :: [Char]Source

Represents the color white. Modify if the physical cube uses a different coloring scheme

invOpp :: Rotation -> RotationSource

Gives inverse of a cube operation.

invDir :: Direction -> DirectionSource

Reverses direction of rotation.

sideToColor :: Side -> ColorSource

Associates a side of a solved cube to a color.

colorToSide :: Color -> SideSource

Inverse of sideToColor