Source codeContentsIndex
RubikCube
Synopsis
data RCube = RCube {
_corners :: !Corners
_edges :: !Edges
_centers :: !Centers
}
data Corner = Corner {
z :: !CFace
y :: !CFace
x :: !CFace
}
data Edge = Edge {
fe :: !CFace
xy :: !CFace
}
data Center = Center {
center :: !CFace
}
data Inst
= NO
| SH
| F
| F'
| R
| R'
| L
| L'
| B
| B'
| U
| U'
| D
| D'
| MF
| MF'
| MU
| MU'
| MR
| MR'
| TF
| TF'
| TU
| TU'
| TR
| TR'
data CubeState = CS {
cube :: IORef RCube
insts :: IORef [Inst]
inst :: IORef [Inst]
rot :: IORef GLfloat
}
type CFace = Word8
nextMove :: Inst -> CubeState -> IO ()
goalState :: RCube
randomMoves :: Int -> IO [[Inst]]
inverseMove :: Inst -> Inst
Documentation
data RCube Source
Constructors
RCube
_corners :: !Corners
_edges :: !Edges
_centers :: !Centers
show/hide Instances
Eq RCube
Show RCube
data Corner Source
Constructors
Corner
z :: !CFaceZ axis
y :: !CFaceY axis
x :: !CFaceX axis
show/hide Instances
Eq Corner
Show Corner
data Edge Source
Constructors
Edge
fe :: !CFaceFront Edge
xy :: !CFaceX or Y axis
show/hide Instances
Eq Edge
Show Edge
data Center Source
Constructors
Center
center :: !CFaceCenter tile
show/hide Instances
Eq Center
Show Center
data Inst Source
Inst Conjunto de itrucciones para manejar el cubo de Rubik.
Constructors
NONO Move
SHShuffle Cube
FRotate Front Clockwise f in the Keyboard
F'Rotate Front CounterClockwise F in the Keyboard
RRotate Right Clockwise r in the Keyboard
R'Rotate Right CounterClockwise R in the Keyboard
LRotate Left Clockwise l in the Keyboard
L'Rotate Left CounterClockwise L in the Keyboard
BRotate Back Clockwise b in the Keyboard
B'Rotate Back CounterClockwise B in the Keyboard
URotate Up Clockwise u in the Keyboard
U'Rotate Up CounterClockwise U in the Keyboard
DRotate Down Clockwise d in the Keyboard
D'Rotate Down CounterClockwise D in the Keyboard
MFRotate Middle Front Clockwise
MF'Rotate Middle Front CounterClockwise
MURotate Middle Up Clockwise
MU'Rotate Middle Up CounterClockwise
MRRotate Middle Right Clockwise
MR'Rotate Middle Right CounterClockwise
TFTurn Cube ClockWise on Z axis
TF'Turn Cube CounterClockwise on Z axis
TUTurn Cube ClockWise on Y axis
TU'Turn Cube CounterClockwise on Y axis
TRTurn Cube ClockWise on X axis
TR'Turn Cube CounterClockwise on X axis
show/hide Instances
Eq Inst
Show Inst
Arbitrary Inst
data CubeState Source
Constructors
CS
cube :: IORef RCube
insts :: IORef [Inst]
inst :: IORef [Inst]
rot :: IORef GLfloat
type CFace = Word8Source
nextMove :: Inst -> CubeState -> IO ()Source
goalState :: RCubeSource
randomMoves :: Int -> IO [[Inst]]Source
inverseMove :: Inst -> InstSource
Produced by Haddock version 2.7.2