@hackage hcube0.1.1

Virtual Rubik's cube of arbitrary size.


-- Maintainer : echbar137@yahoo.co.in -- Stability : provisional -- Portability : portable


Command line arguments for hcube :

./hcube 2 Loads the 2x2x2 cube state. ./hcube 3 Loads the 3x3x3 cube state. ./hcube 4 Loads the 4x4x4 cube state. ./hcube 5 Loads the 5x5x5 cube state. ./hcube Loads the 3x3x3 cube state. ./hcube Creates cube based on physical file.

Cube is created in a solved state if no previous state for that dimension exists. Although the library supports cubes of arbitrary size, the hcube executable does not support sizes beyond 5x5x5.

The state of cube is stored in the 'store' directory with a name based on the dimension of the cube. For example a 3x3x3 cube is saved as 'solved/3x3x3'.

If the 'solve' directory does not exist it is created.

Loading a physical Cube state : Physical file must be placed in the 'store' directory.

Sample contents of a physical file for a 3x3x3 cube is :

[(UpS, [White,Green,Yellow,Green,White,Green,Red,White,Green]), (FrontS, [Blue,Blue,White,Yellow,Orange,Yellow,Red,Yellow,White]), (DownS, [Yellow,Blue,Green,White,Yellow,Blue,White,Orange,Green]), (BackS, [Orange,Blue,Orange,Yellow,Red,Red,Red,Orange,Blue]), (LeftS, [Orange,White,Yellow,Red,Green,Red,Orange,Red,Red]), (RightS, [Blue,Green,Blue,Orange,Blue,White,Green,Orange,Yellow])]

This is a list of six tuples, corresponding to one for each six side of a cube. A tuple consists of the cube side followed by a list of colors appearing on that cube side. The tuples can be in any order, however it is easier to use the order given, rotating the cube about the Left and Right axis to identify the colors of four of the sides. The order of the colors appear in the list is important and is given by the following diagram :

1 2 3 Right 1 2 3 Up 1 2 3 Left 4 5 6 Side 4 5 6 Side 4 5 6 Side 7 8 9 7 8 9 7 8 9

               1  2  3  Front
               4  5  6  Side
               7  8  9

               1  2  3  Down
               4  5  6  Side
               7  8  9

               1  2  3  Back
               4  5  6  Side
               7  8  9

Console commands for hcube :

help displays command list l1+ rotate layer 1 clockwise l2- rotate layer 2 counter h3+ rotate horizontal slab 3 clockwise h1- rotate horizontal slab 1 counter v2+ rotate vertical slab 2 clockwise v3- rotate vertical slab 3 counter l left side view r right side view r+ rotate whole cube clockwise 90 degrees (z axis) r- rotate whole cube counter clockwise 90 degrees (z axis) r2 rotate whole cube 180 degrees fh flip whole cube over along horizontal axis fv flip whole cube over along vertical axis u undo last cube operation

History : 0.1.0 Inital release. 0.1.1 hcube is able to physical cube from a file.

To Do :

  1. Add two phase algorithm to solve 3x3x3 cube in minumal number of moves.
  2. Add undo.
  3. Add sequence macros.
  4. Extend to 4x4x4 and 5x5x5.