Revision efa81f0c
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistySkewb.java | ||
---|---|---|
33 | 33 |
|
34 | 34 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
35 | 35 |
|
36 |
public class TwistySkewb extends TwistyObject
|
|
36 |
public class TwistySkewb extends Twisty6
|
|
37 | 37 |
{ |
38 |
// the four rotation axis of a RubikSkewb. Must be normalized. |
|
39 | 38 |
static final Static3D[] ROT_AXIS = new Static3D[] |
40 | 39 |
{ |
41 | 40 |
new Static3D(+SQ3/3,+SQ3/3,+SQ3/3), |
... | ... | |
44 | 43 |
new Static3D(+SQ3/3,-SQ3/3,-SQ3/3) |
45 | 44 |
}; |
46 | 45 |
|
47 |
private static final int[] FACE_COLORS = new int[] |
|
48 |
{ |
|
49 |
COLOR_YELLOW, COLOR_WHITE, |
|
50 |
COLOR_BLUE , COLOR_GREEN, |
|
51 |
COLOR_RED , COLOR_ORANGE |
|
52 |
}; |
|
53 |
|
|
54 | 46 |
private ScrambleState[] mStates; |
55 | 47 |
private int[] mBasicAngle; |
56 | 48 |
private Static4D[] mQuats; |
... | ... | |
136 | 128 |
return ((layers-2)*(layers-2) + (layers-1)*(layers-1)); |
137 | 129 |
} |
138 | 130 |
|
139 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
140 |
|
|
141 |
float getScreenRatio() |
|
142 |
{ |
|
143 |
return 0.5f; |
|
144 |
} |
|
145 |
|
|
146 | 131 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
147 | 132 |
|
148 | 133 |
Static4D[] getQuats() |
... | ... | |
151 | 136 |
return mQuats; |
152 | 137 |
} |
153 | 138 |
|
154 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
155 |
|
|
156 |
int getNumFaceColors() |
|
157 |
{ |
|
158 |
return FACE_COLORS.length; |
|
159 |
} |
|
160 |
|
|
161 | 139 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
162 | 140 |
|
163 | 141 |
int getSolvedFunctionIndex() |
... | ... | |
165 | 143 |
return 0; |
166 | 144 |
} |
167 | 145 |
|
168 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
169 |
|
|
170 |
boolean shouldResetTextureMaps() |
|
171 |
{ |
|
172 |
return false; |
|
173 |
} |
|
174 |
|
|
175 | 146 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
176 | 147 |
|
177 | 148 |
int getNumStickerTypes(int numLayers) |
... | ... | |
520 | 491 |
} |
521 | 492 |
} |
522 | 493 |
|
523 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
524 |
|
|
525 |
int getColor(int face) |
|
526 |
{ |
|
527 |
return FACE_COLORS[face]; |
|
528 |
} |
|
529 |
|
|
530 | 494 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
531 | 495 |
|
532 | 496 |
ObjectSticker retSticker(int face) |
... | ... | |
557 | 521 |
return mStickers[face/NUM_FACE_COLORS]; |
558 | 522 |
} |
559 | 523 |
|
560 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
561 |
|
|
562 |
float returnMultiplier() |
|
563 |
{ |
|
564 |
return 2.0f; |
|
565 |
} |
|
566 |
|
|
567 | 524 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
568 | 525 |
// PUBLIC API |
569 | 526 |
|
Also available in: Unified diff
Introduce abstract 4,6,8 adn 12 classes.