This module is responsible for persisting the state of the Rubik's cube between rotations of sides , and also it maps the set 1..54 to the facelets of the cube.
There is a 3x3x3 array called C that stores the cubies
C[x][y][z] with x,y,z ranging in 0,1,2
It will contain what cube is in that position
A rotation of the front face at 90 degrees clockwise will be like this
0 , 1 , 2 6 , 3 , 0 3 , 4 , 5 ===> 7 , 4 , 1 6 , 7 , 8 8 , 5 , 2
The following correspondence between C and the faces of the cube :
C[x][y] is Front C[x][y] is Back C[x][z] is Up C[x][z] is Down C[y][z] is Left C[y][z] is Right
Each of the cubies will have 1,2,3 facelets visible depending on wether it is a center, a edge or a corner.
This method will reset the cube by multiplying the current state with its inverse.
By doing that the state of the module will become the identical permutation.
<stefan.petrea at gmail.com>