Revision b19a1d32
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java | ||
---|---|---|
187 | 187 |
{ |
188 | 188 |
int x = numLayers[0]; |
189 | 189 |
int y = numLayers[1]; |
190 |
int z = numLayers[2]; |
|
191 | 190 |
|
192 |
if( x==y && x==z )
|
|
191 |
switch(x)
|
|
193 | 192 |
{ |
194 |
switch(x) |
|
195 |
{ |
|
196 |
case 2: return R.raw.cube2; |
|
197 |
case 3: return R.raw.cube3; |
|
198 |
case 4: return R.raw.cube4; |
|
199 |
case 5: return R.raw.cube5; |
|
200 |
} |
|
193 |
case 2: return y==2 ? R.raw.cube2 : R.raw.cu_232; |
|
194 |
case 3: switch(y) |
|
195 |
{ |
|
196 |
case 2: return R.raw.cu_323; |
|
197 |
case 3: return R.raw.cube3; |
|
198 |
case 4: return R.raw.cu_343; |
|
199 |
} |
|
200 |
case 4: return R.raw.cube4; |
|
201 |
case 5: return R.raw.cube5; |
|
201 | 202 |
} |
202 | 203 |
|
203 | 204 |
return 0; |
... | ... | |
650 | 651 |
} |
651 | 652 |
|
652 | 653 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
653 |
// TODO |
|
654 | 654 |
|
655 | 655 |
public ObjectType intGetObjectType(int[] numLayers) |
656 | 656 |
{ |
657 |
switch(numLayers[0]) |
|
657 |
int x = numLayers[0]; |
|
658 |
int y = numLayers[1]; |
|
659 |
|
|
660 |
switch(x) |
|
658 | 661 |
{ |
659 |
case 2: return ObjectType.CUBE_2; |
|
660 |
case 3: return ObjectType.CUBE_3; |
|
662 |
case 2: switch(y) |
|
663 |
{ |
|
664 |
case 2: return ObjectType.CUBE_2; |
|
665 |
case 3: return ObjectType.CU_232; |
|
666 |
} |
|
667 |
case 3: switch(y) |
|
668 |
{ |
|
669 |
case 2: return ObjectType.CU_323; |
|
670 |
case 3: return ObjectType.CUBE_3; |
|
671 |
case 4: return ObjectType.CU_343; |
|
672 |
} |
|
661 | 673 |
case 4: return ObjectType.CUBE_4; |
662 | 674 |
case 5: return ObjectType.CUBE_5; |
663 | 675 |
} |
Also available in: Unified diff
Cuboids: fully implement the first 3 cuboids (2x3x2, 3x2x3, 3x4x3)