Revision 53f23b64
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/uistate/RubikState.java | ||
---|---|---|
26 | 26 |
|
27 | 27 |
public enum RubikState |
28 | 28 |
{ |
29 |
MAIN ( null , new RubikStateMain() ), |
|
30 |
PLAY ( MAIN , new RubikStatePlay() ), |
|
31 |
SOLV ( PLAY , new RubikStateSolving() ), |
|
32 |
PATT ( MAIN , new RubikStatePattern() ), |
|
29 |
MAIN ( null , true , new RubikStateMain() ),
|
|
30 |
PLAY ( MAIN , true , new RubikStatePlay() ),
|
|
31 |
SOLV ( PLAY , true , new RubikStateSolving() ),
|
|
32 |
PATT ( MAIN , false, new RubikStatePattern() ),
|
|
33 | 33 |
; |
34 | 34 |
|
35 | 35 |
public static final int LENGTH = values().length; |
36 | 36 |
private final RubikState mBack; |
37 |
private boolean mCanRotate; |
|
37 | 38 |
private final RubikStateAbstract mClass; |
38 | 39 |
private static final RubikState[] sizes; |
39 | 40 |
|
... | ... | |
65 | 66 |
return mCurrState; |
66 | 67 |
} |
67 | 68 |
|
69 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
70 |
|
|
71 |
public static boolean canRotate() |
|
72 |
{ |
|
73 |
return mCurrState.mCanRotate; |
|
74 |
} |
|
75 |
|
|
68 | 76 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
69 | 77 |
|
70 | 78 |
public static void savePreferences(SharedPreferences.Editor editor) |
... | ... | |
112 | 120 |
|
113 | 121 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
114 | 122 |
|
115 |
RubikState(RubikState back, RubikStateAbstract clazz) |
|
123 |
RubikState(RubikState back, boolean canRotate, RubikStateAbstract clazz)
|
|
116 | 124 |
{ |
117 |
mBack = back; |
|
118 |
mClass = clazz; |
|
125 |
mBack = back; |
|
126 |
mCanRotate = canRotate; |
|
127 |
mClass = clazz; |
|
119 | 128 |
} |
120 | 129 |
|
121 | 130 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Progress with Pretty Patterns - do away with the tabbed dialog!