org.kociemba.twophase
Class Tools

java.lang.Object
  extended by org.kociemba.twophase.Tools

public class Tools
extends java.lang.Object


Constructor Summary
Tools()
           
 
Method Summary
static java.lang.String randomCube()
          Generates a random cube.
static int verify(java.lang.String s)
          Check if the cube definition string s represents a solvable cube.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tools

public Tools()
Method Detail

verify

public static int verify(java.lang.String s)
Check if the cube definition string s represents a solvable cube.

Parameters:
s - is the cube definition string , see Facelet
Returns:
0: Cube is solvable
-1: There is not exactly one facelet of each colour
-2: Not all 12 edges exist exactly once
-3: Flip error: One edge has to be flipped
-4: Not all 8 corners exist exactly once
-5: Twist error: One corner has to be twisted
-6: Parity error: Two corners or two edges have to be exchanged

randomCube

public static java.lang.String randomCube()
Generates a random cube.

Returns:
A random cube in the string representation. Each cube of the cube space has the same probability.