Revision a75ae1ee
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java | ||
---|---|---|
301 | 301 |
|
302 | 302 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
303 | 303 |
|
304 |
protected int getNumCubitFaces()
|
|
304 |
public int getNumCubitFaces()
|
|
305 | 305 |
{ |
306 | 306 |
return 8; |
307 | 307 |
} |
... | ... | |
315 | 315 |
|
316 | 316 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
317 | 317 |
|
318 |
private int faceColor(int cubit, int axis)
|
|
318 |
private int faceColor(int cubit, int face)
|
|
319 | 319 |
{ |
320 |
return CUBITS[cubit].getRotRow(axis) == 1 ? axis : NUM_TEXTURES;
|
|
320 |
return CUBITS[cubit].getRotRow(face) == 1 ? face : -1;
|
|
321 | 321 |
} |
322 | 322 |
|
323 | 323 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
324 | 324 |
|
325 |
protected int getFaceColor(int cubit, int cubitface, int[] numLayers)
|
|
325 |
public int getVariantFaceColor(int variant, int face, int[] numLayers)
|
|
326 | 326 |
{ |
327 |
int numL = numLayers[0]; |
|
327 |
return 0; |
|
328 |
} |
|
328 | 329 |
|
329 |
if( cubit< (numL-1)*numL*(numL+1)/6 ) |
|
330 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
331 |
|
|
332 |
public int getCubitFaceColor(int cubit, int face, int[] numLayers) |
|
333 |
{ |
|
334 |
if( cubit < getNumOctahedrons(numLayers[0]) ) |
|
330 | 335 |
{ |
331 |
switch( cubitface )
|
|
336 |
switch( face ) |
|
332 | 337 |
{ |
333 | 338 |
case 0: return faceColor(cubit,0); |
334 | 339 |
case 2: return faceColor(cubit,1); |
335 | 340 |
case 5: return faceColor(cubit,3); |
336 | 341 |
case 7: return faceColor(cubit,2); |
337 |
default:return NUM_TEXTURES;
|
|
342 |
default:return -1;
|
|
338 | 343 |
} |
339 | 344 |
} |
340 | 345 |
else |
341 | 346 |
{ |
342 |
return cubitface<NUM_TEXTURES ? faceColor(cubit,cubitface) : NUM_TEXTURES;
|
|
347 |
return face<NUM_FACE_COLORS ? faceColor(cubit,face) : -1;
|
|
343 | 348 |
} |
344 | 349 |
} |
345 | 350 |
|
Also available in: Unified diff
Separate the notions of a sticker shape and a sticker color.