|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.rubik.solver.FaceletCube
public class FaceletCube
The FaceletCube represents the cube by the markings of the 54 individual facelets. The FaceletCube can then be asked to validate the cube to determine if it is in a legal, and thus solvable, configuration.
This class has been derived from facecube.cpp and facecube.h from the 'Kociemba Cube Solver 1.0' (KCube) (c) Greg Schmidt.
| Field Summary | |
|---|---|
static int |
B
|
static int |
D
|
static int |
DUPLICATE_CENTER_MARKING
|
static int |
F
|
static int |
INVALID_CORNER_MARKINGS
|
static int |
INVALID_CORNER_PARITY
|
static int |
INVALID_EDGE_MARKINGS
|
static int |
INVALID_EDGE_PARITY
|
static int |
INVALID_FACELETCOUNT
|
static int |
INVALID_MARKER
|
static int |
INVALID_TOTAL_PARITY
|
static int |
L
|
static int |
NUMBER_OF_ERRORS
|
static int |
R
|
static int |
U
|
static int |
VALID
|
| Constructor Summary | |
|---|---|
FaceletCube()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
dump()
Dump cube state. |
int |
faceNameToOffset(char faceName)
Convert face name to enumeration offset. |
java.lang.String |
getErrorText(int error)
Return the text associated with an error return code. |
void |
setFaceMarkings(int face,
char[] markings)
Set the cube markings for a given face. |
java.lang.String |
toString()
|
int |
validate(Cube cube)
Validate markings, permutation, and parity. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int U
public static final int D
public static final int L
public static final int R
public static final int F
public static final int B
public static final int VALID
public static final int INVALID_MARKER
public static final int INVALID_FACELETCOUNT
public static final int DUPLICATE_CENTER_MARKING
public static final int INVALID_CORNER_MARKINGS
public static final int INVALID_CORNER_PARITY
public static final int INVALID_EDGE_MARKINGS
public static final int INVALID_EDGE_PARITY
public static final int INVALID_TOTAL_PARITY
public static final int NUMBER_OF_ERRORS
| Constructor Detail |
|---|
public FaceletCube()
| Method Detail |
|---|
public void setFaceMarkings(int face,
char[] markings)
public int validate(Cube cube)
public int faceNameToOffset(char faceName)
public java.lang.String getErrorText(int error)
public void dump()
public java.lang.String toString()
toString in class java.lang.Object
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||