Revision 9c2f0c91
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/solvers/SolverMain.java | ||
---|---|---|
22 | 22 |
import android.content.res.Resources; |
23 | 23 |
|
24 | 24 |
import org.distorted.main.R; |
25 |
import org.distorted.objects.RubikObjectList;
|
|
25 |
import org.distorted.objects.ObjectList; |
|
26 | 26 |
import org.distorted.states.RubikState; |
27 | 27 |
import org.distorted.states.RubikStateSolver; |
28 | 28 |
|
... | ... | |
32 | 32 |
{ |
33 | 33 |
private String mObjectPosition; |
34 | 34 |
private Resources mRes; |
35 |
private RubikObjectList mObject;
|
|
35 |
private ObjectList mObject; |
|
36 | 36 |
private int mSize; |
37 | 37 |
|
38 | 38 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
39 | 39 |
|
40 |
public SolverMain(Resources res, RubikObjectList object, int size, String position )
|
|
40 |
public SolverMain(Resources res, ObjectList object, int size, String position ) |
|
41 | 41 |
{ |
42 | 42 |
mRes = res; |
43 | 43 |
mObject = object; |
... | ... | |
51 | 51 |
// If a certain cubit is locked, return the color (index into it's FACE_COLORS array) it |
52 | 52 |
// must have. Otherwise return -1. |
53 | 53 |
|
54 |
public static int cubitIsLocked(RubikObjectList object, int size, int cubit)
|
|
54 |
public static int cubitIsLocked(ObjectList object, int size, int cubit) |
|
55 | 55 |
{ |
56 |
if( object == RubikObjectList.CUBE && size == 3)
|
|
56 |
if( object == ObjectList.CUBE && size == 3) |
|
57 | 57 |
{ |
58 | 58 |
if( cubit==21 ) return 0; // center of the right face |
59 | 59 |
if( cubit== 4 ) return 1; // center of the left face |
... | ... | |
121 | 121 |
{ |
122 | 122 |
RubikStateSolver solver = (RubikStateSolver) RubikState.SVER.getStateClass(); |
123 | 123 |
|
124 |
if( mObject == RubikObjectList.CUBE && mSize == 3)
|
|
124 |
if( mObject == ObjectList.CUBE && mSize == 3) |
|
125 | 125 |
{ |
126 | 126 |
solveCube3(solver); |
127 | 127 |
} |
Also available in: Unified diff
Rename some classes.