1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2
|
// Copyright 2020 Leszek Koltunski //
|
3
|
// //
|
4
|
// This file is part of Magic Cube. //
|
5
|
// //
|
6
|
// Magic Cube is proprietary software licensed under an EULA which you should have received //
|
7
|
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html //
|
8
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
9
|
|
10
|
package org.distorted.objectlib.objects;
|
11
|
|
12
|
import static org.distorted.objectlib.touchcontrol.TouchControlDodecahedron.COS54;
|
13
|
import static org.distorted.objectlib.touchcontrol.TouchControlDodecahedron.SIN54;
|
14
|
|
15
|
import org.distorted.library.type.Static3D;
|
16
|
import org.distorted.library.type.Static4D;
|
17
|
import org.distorted.library.main.QuatHelper;
|
18
|
|
19
|
import org.distorted.objectlib.helpers.FactoryCubit;
|
20
|
import org.distorted.objectlib.helpers.ObjectFaceShape;
|
21
|
import org.distorted.objectlib.helpers.ObjectSignature;
|
22
|
import org.distorted.objectlib.helpers.ObjectVertexEffects;
|
23
|
import org.distorted.objectlib.main.InitAssets;
|
24
|
import org.distorted.objectlib.main.InitData;
|
25
|
import org.distorted.objectlib.main.ObjectSignatures;
|
26
|
import org.distorted.objectlib.main.ObjectType;
|
27
|
import org.distorted.objectlib.helpers.ObjectShape;
|
28
|
|
29
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
30
|
|
31
|
public class TwistyMegaminx extends TwistyDodecahedron
|
32
|
{
|
33
|
static final float MEGA_D = 0.04f;
|
34
|
private int[] mQuatCenterIndices;
|
35
|
|
36
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
37
|
|
38
|
public TwistyMegaminx(int meshState, int iconMode, Static4D quat, Static3D move, float scale, InitData data, InitAssets asset)
|
39
|
{
|
40
|
super(meshState, iconMode, quat, move, scale, data, asset);
|
41
|
}
|
42
|
|
43
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
44
|
|
45
|
private void initializeCenterIndices()
|
46
|
{
|
47
|
mQuatCenterIndices = new int[] { 0, 35, 55, 38, 48, 41, 42, 58, 57, 46, 29, 59 };
|
48
|
}
|
49
|
|
50
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
51
|
|
52
|
private int numCubitsPerCorner(int numLayers)
|
53
|
{
|
54
|
return 3*((numLayers-1)/2)*((numLayers-3)/2) + 1;
|
55
|
}
|
56
|
|
57
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
58
|
|
59
|
private int numCubitsPerEdge(int numLayers)
|
60
|
{
|
61
|
return numLayers-2;
|
62
|
}
|
63
|
|
64
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
65
|
|
66
|
public float[][] getCuts(int[] numLayers)
|
67
|
{
|
68
|
return genericGetCuts(numLayers[0],0.5f-MEGA_D);
|
69
|
}
|
70
|
|
71
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
72
|
|
73
|
private float[] computeCenter(int center, int numLayers)
|
74
|
{
|
75
|
if( mCenterCoords==null ) initializeCenterCoords();
|
76
|
float[] coords = mCenterCoords[center];
|
77
|
float A = (float)numLayers/3;
|
78
|
|
79
|
return new float[] { A*coords[0], A*coords[1], A*coords[2] };
|
80
|
}
|
81
|
|
82
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
83
|
// Fill out mCurrCorner{X,Y,Z} by applying appropriate Quat to mBasicCorner{X,Y,Z}
|
84
|
// Appropriate one: QUATS[QUAT_INDICES[corner]].
|
85
|
|
86
|
private void computeBasicCornerVectors(int corner)
|
87
|
{
|
88
|
if( mQuatCornerIndices==null ) initializeQuatIndices();
|
89
|
if( mCurrCornerV==null || mBasicCornerV==null ) initializeCornerV();
|
90
|
|
91
|
Static4D quat = mObjectQuats[mQuatCornerIndices[corner]];
|
92
|
|
93
|
mCurrCornerV[0] = QuatHelper.rotateVectorByQuat(mBasicCornerV[0],quat);
|
94
|
mCurrCornerV[1] = QuatHelper.rotateVectorByQuat(mBasicCornerV[1],quat);
|
95
|
mCurrCornerV[2] = QuatHelper.rotateVectorByQuat(mBasicCornerV[2],quat);
|
96
|
}
|
97
|
|
98
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
99
|
|
100
|
private float[] computeCorner(int numCubitsPerCorner, int numLayers, int corner, int part)
|
101
|
{
|
102
|
if( mCorners==null ) initializeCorners();
|
103
|
if( mCurrCornerV==null || mBasicCornerV==null ) initializeCornerV();
|
104
|
|
105
|
float D = numLayers/3.0f;
|
106
|
float[] corn = mCorners[corner];
|
107
|
|
108
|
if( part==0 )
|
109
|
{
|
110
|
return new float[] { corn[0]*D, corn[1]*D, corn[2]*D };
|
111
|
}
|
112
|
else
|
113
|
{
|
114
|
float E = 2.0f*D*(0.5f-MEGA_D)/(0.5f*(numLayers-1));
|
115
|
int N = (numCubitsPerCorner-1)/3;
|
116
|
int block = (part-1) % N;
|
117
|
int index = (part-1) / N;
|
118
|
Static4D pri = mCurrCornerV[index];
|
119
|
Static4D sec = mCurrCornerV[(index+2)%3];
|
120
|
|
121
|
int layers= (numLayers-3)/2;
|
122
|
int multP = (block % layers) + 1;
|
123
|
int multS = (block / layers);
|
124
|
|
125
|
return new float[] {
|
126
|
corn[0]*D + (pri.get0()*multP + sec.get0()*multS)*E,
|
127
|
corn[1]*D + (pri.get1()*multP + sec.get1()*multS)*E,
|
128
|
corn[2]*D + (pri.get2()*multP + sec.get2()*multS)*E
|
129
|
};
|
130
|
}
|
131
|
}
|
132
|
|
133
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
134
|
|
135
|
private int computeEdgeType(int cubit, int numCubitsPerCorner, int numCubitsPerEdge)
|
136
|
{
|
137
|
int part = (cubit - NUM_CORNERS*numCubitsPerCorner) % numCubitsPerEdge;
|
138
|
return (part+1)/2;
|
139
|
}
|
140
|
|
141
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
142
|
|
143
|
private float[] computeEdge(int numLayers, int edge, int part)
|
144
|
{
|
145
|
if( mCenterCoords==null ) initializeCenterCoords();
|
146
|
if( mCorners==null ) initializeCorners();
|
147
|
if( mEdgeMap==null ) initializeEdgeMap();
|
148
|
|
149
|
float D = numLayers/3.0f;
|
150
|
float[] c1 = mCorners[ mEdgeMap[edge][0] ];
|
151
|
float[] c2 = mCorners[ mEdgeMap[edge][1] ];
|
152
|
float x = D * (c1[0]+c2[0]) / 2;
|
153
|
float y = D * (c1[1]+c2[1]) / 2;
|
154
|
float z = D * (c1[2]+c2[2]) / 2;
|
155
|
|
156
|
if( part==0 )
|
157
|
{
|
158
|
return new float[] { x, y, z };
|
159
|
}
|
160
|
else
|
161
|
{
|
162
|
int mult = (part+1)/2;
|
163
|
int dir = (part+1)%2;
|
164
|
float[] center = mCenterCoords[ mEdgeMap[edge][dir+2] ];
|
165
|
|
166
|
float vX = D*center[0] - x;
|
167
|
float vY = D*center[1] - y;
|
168
|
float vZ = D*center[2] - z;
|
169
|
|
170
|
float A = 3*mult*D*(0.5f-MEGA_D)*COS18/((numLayers-1)*0.5f);
|
171
|
A /= (float)Math.sqrt(vX*vX+vY*vY+vZ*vZ);
|
172
|
|
173
|
return new float[] { x+A*vX, y+A*vY, z+A*vZ };
|
174
|
}
|
175
|
}
|
176
|
|
177
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
178
|
|
179
|
public float[][] getCubitPositions(int[] numLayers)
|
180
|
{
|
181
|
int numL = numLayers[0];
|
182
|
int numCubitsPerCorner = numCubitsPerCorner(numL);
|
183
|
int numCubitsPerEdge = numCubitsPerEdge(numL);
|
184
|
int numCubits = NUM_CORNERS*numCubitsPerCorner + NUM_EDGES*numCubitsPerEdge + NUM_CENTERS;
|
185
|
int index=0;
|
186
|
|
187
|
final float[][] CENTERS = new float[numCubits][];
|
188
|
|
189
|
for(int corner=0; corner<NUM_CORNERS; corner++)
|
190
|
{
|
191
|
computeBasicCornerVectors(corner);
|
192
|
|
193
|
for(int part=0; part<numCubitsPerCorner; part++, index++)
|
194
|
{
|
195
|
CENTERS[index] = computeCorner(numCubitsPerCorner,numL,corner,part);
|
196
|
}
|
197
|
}
|
198
|
|
199
|
for(int edge=0; edge<NUM_EDGES; edge++)
|
200
|
{
|
201
|
for(int part=0; part<numCubitsPerEdge; part++, index++)
|
202
|
{
|
203
|
CENTERS[index] = computeEdge(numL, edge, part );
|
204
|
}
|
205
|
}
|
206
|
|
207
|
for(int center=0; center<NUM_CENTERS; center++, index++)
|
208
|
{
|
209
|
CENTERS[index] = computeCenter(center, numL);
|
210
|
}
|
211
|
|
212
|
return CENTERS;
|
213
|
}
|
214
|
|
215
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
216
|
|
217
|
public Static4D getCubitQuats(int cubit, int[] numLayers)
|
218
|
{
|
219
|
int numL = numLayers[0];
|
220
|
int numCubitsPerCorner = numCubitsPerCorner(numL);
|
221
|
int numCubitsPerEdge = numCubitsPerEdge(numL);
|
222
|
|
223
|
return mObjectQuats[getQuat(cubit,numCubitsPerCorner,numCubitsPerEdge)];
|
224
|
}
|
225
|
|
226
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
227
|
|
228
|
private int getQuat(int cubit, int numCubitsPerCorner, int numCubitsPerEdge)
|
229
|
{
|
230
|
if( mQuatCornerIndices==null || mQuatEdgeIndices==null ) initializeQuatIndices();
|
231
|
if( mQuatCenterIndices==null ) initializeCenterIndices();
|
232
|
|
233
|
if( cubit < NUM_CORNERS*numCubitsPerCorner )
|
234
|
{
|
235
|
int corner = cubit/numCubitsPerCorner;
|
236
|
return mQuatCornerIndices[corner];
|
237
|
}
|
238
|
|
239
|
if( cubit < NUM_CORNERS*numCubitsPerCorner + NUM_EDGES*numCubitsPerEdge )
|
240
|
{
|
241
|
int edge = (cubit-NUM_CORNERS*numCubitsPerCorner)/numCubitsPerEdge;
|
242
|
return mQuatEdgeIndices[edge];
|
243
|
}
|
244
|
|
245
|
int center = cubit - NUM_CORNERS*numCubitsPerCorner - NUM_EDGES*numCubitsPerEdge;
|
246
|
return mQuatCenterIndices[center];
|
247
|
}
|
248
|
|
249
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
250
|
|
251
|
private float[][] getVertices(int variant)
|
252
|
{
|
253
|
int[] numLayers = getNumLayers();
|
254
|
int numVariants = getNumCubitVariants(numLayers);
|
255
|
int numL = numLayers[0];
|
256
|
|
257
|
if( variant==0 )
|
258
|
{
|
259
|
float width = numL*(0.5f-MEGA_D)/(0.5f*(numL-1));
|
260
|
float X = width*COS18*SIN_HALFD;
|
261
|
float Y = width*SIN18;
|
262
|
float Z = width*COS18*COS_HALFD;
|
263
|
|
264
|
return new float[][]
|
265
|
{
|
266
|
{ 0, 0 , 0 },
|
267
|
{ X, Y , -Z },
|
268
|
{ 0, 2*Y ,-2*Z },
|
269
|
{ -X, Y , -Z },
|
270
|
{ 0, 0-width, 0 },
|
271
|
{ X, Y-width, -Z },
|
272
|
{ 0, 2*Y-width,-2*Z },
|
273
|
{ -X, Y-width, -Z },
|
274
|
};
|
275
|
}
|
276
|
else if( variant<numVariants-1 )
|
277
|
{
|
278
|
int type = variant-1;
|
279
|
float height= numL*(0.5f-MEGA_D)*COS18/((numL-1)*0.5f);
|
280
|
float width = numL*2*MEGA_D + 2*type*height*SIN18/COS18;
|
281
|
|
282
|
float W = width/2;
|
283
|
float X = height*SIN_HALFD;
|
284
|
float Y = height*SIN18/COS18;
|
285
|
float Z = height*COS_HALFD;
|
286
|
|
287
|
return new float[][]
|
288
|
{
|
289
|
{ 0, W , 0 },
|
290
|
{ X, W+Y , -Z },
|
291
|
{ 0, W+2*Y ,-2*Z },
|
292
|
{ -X, W+Y , -Z },
|
293
|
{ 0, -W , 0 },
|
294
|
{ X,-W-Y , -Z },
|
295
|
{ 0,-W-2*Y ,-2*Z },
|
296
|
{ -X,-W-Y , -Z },
|
297
|
};
|
298
|
}
|
299
|
else
|
300
|
{
|
301
|
float width = 2*numL*(MEGA_D+(0.5f-MEGA_D)*SIN18);
|
302
|
final double ANGLE = 0.825f*Math.PI;
|
303
|
final float cosA = (float)Math.cos(ANGLE);
|
304
|
final float sinA = (float)Math.sin(ANGLE);
|
305
|
|
306
|
float R = 0.5f*width/COS54;
|
307
|
float X1 = R*COS54;
|
308
|
float Y1 = R*SIN54;
|
309
|
float X2 = R*COS18;
|
310
|
float Y2 = R*SIN18;
|
311
|
|
312
|
return new float[][]
|
313
|
{
|
314
|
{-X1, Y1*sinA, Y1*cosA},
|
315
|
{-X2,-Y2*sinA,-Y2*cosA},
|
316
|
{ 0 ,-R*sinA ,-R*cosA },
|
317
|
{+X2,-Y2*sinA,-Y2*cosA},
|
318
|
{+X1, Y1*sinA, Y1*cosA},
|
319
|
{ 0 , R*cosA ,-R*sinA }
|
320
|
};
|
321
|
}
|
322
|
}
|
323
|
|
324
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
325
|
|
326
|
public ObjectShape getObjectShape(int variant)
|
327
|
{
|
328
|
int[] numLayers = getNumLayers();
|
329
|
int numVariants = getNumCubitVariants(numLayers);
|
330
|
|
331
|
if( variant==0 )
|
332
|
{
|
333
|
int[][] indices =
|
334
|
{
|
335
|
{4,5,1,0},
|
336
|
{7,4,0,3},
|
337
|
{0,1,2,3},
|
338
|
{7,6,5,4},
|
339
|
{2,1,5,6},
|
340
|
{3,2,6,7}
|
341
|
};
|
342
|
|
343
|
return new ObjectShape(getVertices(variant), indices);
|
344
|
}
|
345
|
if( variant<numVariants-1 )
|
346
|
{
|
347
|
int[][] indices =
|
348
|
{
|
349
|
{4,5,1,0},
|
350
|
{7,4,0,3},
|
351
|
{3,2,6,7},
|
352
|
{2,1,5,6},
|
353
|
{0,1,2,3},
|
354
|
{7,6,5,4}
|
355
|
};
|
356
|
|
357
|
return new ObjectShape(getVertices(variant), indices);
|
358
|
}
|
359
|
else
|
360
|
{
|
361
|
int[][] indices =
|
362
|
{
|
363
|
{0,1,2,3,4},
|
364
|
{5,1,0},
|
365
|
{5,2,1},
|
366
|
{5,3,2},
|
367
|
{5,4,3},
|
368
|
{5,0,4}
|
369
|
};
|
370
|
|
371
|
return new ObjectShape(getVertices(variant), indices);
|
372
|
}
|
373
|
}
|
374
|
|
375
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
376
|
|
377
|
public ObjectFaceShape getObjectFaceShape(int variant)
|
378
|
{
|
379
|
int[] numLayers = getNumLayers();
|
380
|
int numVariants = getNumCubitVariants(numLayers);
|
381
|
int numL = numLayers[0];
|
382
|
boolean small = numL<=3;
|
383
|
|
384
|
if( variant==0 )
|
385
|
{
|
386
|
float h1 = isInIconMode() ? 0.001f : 0.04f;
|
387
|
float[][] bands = { {h1,34,0.3f,0.2f,3,0,0}, {0.001f,10,0.0f,0.0f,2,0,0} };
|
388
|
int[] indices = { 0,0,0,1,1,1};
|
389
|
return new ObjectFaceShape(bands,indices,null);
|
390
|
}
|
391
|
if( variant<numVariants-1 )
|
392
|
{
|
393
|
int N = small ? 5 : 3;
|
394
|
float h1 = isInIconMode() ? 0.001f : 0.04f;
|
395
|
float[][] bands = { {h1,34,0.2f,0.2f,N,0,0},{0.001f,34,0.3f,0.2f,2,0,0} };
|
396
|
int[] indices = { 0,0,1,1,1,1};
|
397
|
return new ObjectFaceShape(bands,indices,null);
|
398
|
}
|
399
|
else
|
400
|
{
|
401
|
float width = 2*numL*(MEGA_D+(0.5f-MEGA_D)*SIN18);
|
402
|
float R = 0.5f*width/COS54;
|
403
|
int N = small ? 4 : 3;
|
404
|
float h1 = isInIconMode() ? 0.001f : (small ? 0.04f : 0.015f);
|
405
|
float[][] bands = { { h1,45, R/3,0.2f,N,0,0},{0.001f,45, R/3,0.2f,2,0,0} };
|
406
|
int[] indices = { 0,1,1,1,1,1 };
|
407
|
return new ObjectFaceShape(bands,indices,null);
|
408
|
}
|
409
|
}
|
410
|
|
411
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
412
|
|
413
|
|
414
|
|
415
|
public ObjectVertexEffects getVertexEffects(int variant)
|
416
|
{
|
417
|
if( variant==0 )
|
418
|
{
|
419
|
int[] numLayers = getNumLayers();
|
420
|
int numL = numLayers[0];
|
421
|
float width = numL*(0.5f-MEGA_D)/(0.5f*(numL-1));
|
422
|
float Y = width*SIN18;
|
423
|
float Z = width*COS18*COS_HALFD;
|
424
|
|
425
|
float[][] corners = { {0.03f,0.15f}, {0.02f,0.10f} };
|
426
|
int[] cornerIndices = { 0,1,1,1,-1,-1,-1,-1 };
|
427
|
float[][] centers = { { 0.0f, 2*Y-width,-2*Z } };
|
428
|
int[] centerIndices = { 0,0,0,0,-1,-1,-1,-1 };
|
429
|
return FactoryCubit.generateVertexEffect(getVertices(variant),corners,cornerIndices,centers,centerIndices);
|
430
|
}
|
431
|
else
|
432
|
{
|
433
|
return null;
|
434
|
}
|
435
|
}
|
436
|
|
437
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
438
|
|
439
|
public int getNumCubitVariants(int[] numLayers)
|
440
|
{
|
441
|
return 2 + numLayers[0]/2;
|
442
|
}
|
443
|
|
444
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
445
|
|
446
|
public int getCubitVariant(int cubit, int[] numLayers)
|
447
|
{
|
448
|
int numL = numLayers[0];
|
449
|
int numCubitsPerCorner = numCubitsPerCorner(numL);
|
450
|
|
451
|
if( cubit<NUM_CORNERS*numCubitsPerCorner ) return 0;
|
452
|
|
453
|
int numCubitsPerEdge = numCubitsPerEdge(numL);
|
454
|
|
455
|
if( cubit<NUM_CORNERS*numCubitsPerCorner + NUM_EDGES*numCubitsPerEdge )
|
456
|
{
|
457
|
int type = computeEdgeType(cubit,numCubitsPerCorner,numCubitsPerEdge);
|
458
|
return type+1;
|
459
|
}
|
460
|
|
461
|
return getNumCubitVariants(numLayers)-1;
|
462
|
}
|
463
|
|
464
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
465
|
|
466
|
public float getStickerRadius()
|
467
|
{
|
468
|
return 0.13f;
|
469
|
}
|
470
|
|
471
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
472
|
|
473
|
public float getStickerStroke()
|
474
|
{
|
475
|
float stroke = 0.18f;
|
476
|
|
477
|
if( isInIconMode() )
|
478
|
{
|
479
|
int[] numLayers = getNumLayers();
|
480
|
stroke*= ( numLayers[0]==3 ? 1.5f : 2.2f );
|
481
|
}
|
482
|
|
483
|
return stroke;
|
484
|
}
|
485
|
|
486
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
487
|
|
488
|
public float[][] getStickerAngles()
|
489
|
{
|
490
|
return null;
|
491
|
}
|
492
|
|
493
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
494
|
|
495
|
public String getShortName()
|
496
|
{
|
497
|
switch(getNumLayers()[0])
|
498
|
{
|
499
|
case 3: return ObjectType.MEGA_3.name();
|
500
|
case 5: return ObjectType.MEGA_5.name();
|
501
|
}
|
502
|
|
503
|
return ObjectType.MEGA_3.name();
|
504
|
}
|
505
|
|
506
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
507
|
|
508
|
public ObjectSignature getSignature()
|
509
|
{
|
510
|
switch(getNumLayers()[0])
|
511
|
{
|
512
|
case 3: return new ObjectSignature(ObjectSignatures.MEGA_3);
|
513
|
case 5: return new ObjectSignature(ObjectSignatures.MEGA_5);
|
514
|
}
|
515
|
|
516
|
return null;
|
517
|
}
|
518
|
|
519
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
520
|
|
521
|
public String getObjectName()
|
522
|
{
|
523
|
switch(getNumLayers()[0])
|
524
|
{
|
525
|
case 3: return "Megaminx";
|
526
|
case 5: return "Gigaminx";
|
527
|
}
|
528
|
return "Megaminx";
|
529
|
}
|
530
|
|
531
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
532
|
|
533
|
public String getInventor()
|
534
|
{
|
535
|
switch(getNumLayers()[0])
|
536
|
{
|
537
|
case 3: return "Ferenc Szlivka";
|
538
|
case 5: return "Tyler Fox";
|
539
|
}
|
540
|
return "Ferenc Szlivka";
|
541
|
}
|
542
|
|
543
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
544
|
|
545
|
public int getYearOfInvention()
|
546
|
{
|
547
|
switch(getNumLayers()[0])
|
548
|
{
|
549
|
case 3: return 1982;
|
550
|
case 5: return 2006;
|
551
|
}
|
552
|
return 2006;
|
553
|
}
|
554
|
|
555
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
556
|
|
557
|
public int getComplexity()
|
558
|
{
|
559
|
switch(getNumLayers()[0])
|
560
|
{
|
561
|
case 3: return 3;
|
562
|
case 5: return 4;
|
563
|
}
|
564
|
return 9;
|
565
|
}
|
566
|
|
567
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
568
|
|
569
|
public String[][] getTutorials()
|
570
|
{
|
571
|
int[] numLayers = getNumLayers();
|
572
|
|
573
|
switch(numLayers[0])
|
574
|
{
|
575
|
case 3: return new String[][] {
|
576
|
{"gb","j4x61L5Onzk","How to Solve the Megaminx","Z3"},
|
577
|
{"es","xuKbT6Il0Ko","Resolver Megaminx","Cuby"},
|
578
|
{"ru","WgoguOY3tKI","Как собрать Мегаминкс","Алексей Ярыгин"},
|
579
|
{"fr","Ln1vl85puKo","Résoudre le Megaminx","Victor Colin"},
|
580
|
{"de","d-GQD6CBdB8","Megaminx lösen","Pezcraft"},
|
581
|
{"pl","BZTW6ApeRZE","Jak ułożyć: Megaminx","DżoDżo"},
|
582
|
{"br","0BTzkDZW078","Como resolver o Megaminx 1/2","Pedro Filho"},
|
583
|
{"br","VVHzZI73BN0","Como resolver o Megaminx 2/2","Pedro Filho"},
|
584
|
{"kr","2NUsMclrD-0","메가밍크스 예시솔빙","iamzoone"},
|
585
|
{"vn","wRN3t91vD8w","Tutorial N.9 - Megaminx","Duy Thích Rubik"},
|
586
|
};
|
587
|
case 5: return new String[][] {
|
588
|
{"gb","MNBMm8BnHtQ","Solve the Gigaminx Part 1","BeardedCubing"},
|
589
|
{"gb","QrrP4GwqVMw","Solve the Gigaminx Part 2","BeardedCubing"},
|
590
|
{"es","ex5EQMBxV1U","Tutorial Gigaminx","RubikArt"},
|
591
|
{"ru","UJYK3SHjSGg","Как собрать Гигаминкс ч.1","Артем Мартиросов"},
|
592
|
{"ru","-iBCpr4Gwsw","Как собрать Гигаминкс ч.2","Артем Мартиросов"},
|
593
|
{"ru","4-dI7NCW8n8","Как собрать Гигаминкс ч.3","Артем Мартиросов"},
|
594
|
{"fr","e485fh0V1dg","Résolution du Gigaminx","Asthalis"},
|
595
|
{"de","APSAj4UtOAg","Megaminx 5x5 lösen","JamesKnopf"},
|
596
|
{"pl","qbKLMCX1wKg","Jak ułożyć Gigaminxa cz.1","chomik19751"},
|
597
|
{"pl","JQOXD3qleH4","Jak ułożyć Gigaminxa cz.2","chomik19751"},
|
598
|
{"pl","WF2katJ22FA","Jak ułożyć Gigaminxa cz.3","chomik19751"},
|
599
|
{"pl","jlyRrJjH4qQ","Jak ułożyć Gigaminxa cz.4","chomik19751"},
|
600
|
{"kr","HfPFrWuz6z4","기가밍크스 gigaminx","큐브놀이터"},
|
601
|
{"vn","yJzejHqZscY","Tutorial N.49 - Gigaminx","Duy Thích Rubik"},
|
602
|
};
|
603
|
}
|
604
|
return null;
|
605
|
}
|
606
|
}
|