1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2
|
// Copyright 2020 Leszek Koltunski //
|
3
|
// //
|
4
|
// This file is part of Magic Cube. //
|
5
|
// //
|
6
|
// Magic Cube is free software: you can redistribute it and/or modify //
|
7
|
// it under the terms of the GNU General Public License as published by //
|
8
|
// the Free Software Foundation, either version 2 of the License, or //
|
9
|
// (at your option) any later version. //
|
10
|
// //
|
11
|
// Magic Cube is distributed in the hope that it will be useful, //
|
12
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
13
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
14
|
// GNU General Public License for more details. //
|
15
|
// //
|
16
|
// You should have received a copy of the GNU General Public License //
|
17
|
// along with Magic Cube. If not, see <http://www.gnu.org/licenses/>. //
|
18
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
19
|
|
20
|
package org.distorted.objectlib.objects;
|
21
|
|
22
|
import static org.distorted.objectlib.touchcontrol.TouchControl.TC_HEXAHEDRON;
|
23
|
import static org.distorted.objectlib.touchcontrol.TouchControl.TYPE_SPLIT_CORNER;
|
24
|
|
25
|
import java.io.InputStream;
|
26
|
|
27
|
import org.distorted.library.type.Static3D;
|
28
|
import org.distorted.library.type.Static4D;
|
29
|
|
30
|
import org.distorted.objectlib.helpers.ObjectFaceShape;
|
31
|
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron;
|
32
|
import org.distorted.objectlib.main.ObjectControl;
|
33
|
import org.distorted.objectlib.main.ObjectType;
|
34
|
import org.distorted.objectlib.helpers.ObjectShape;
|
35
|
import org.distorted.objectlib.helpers.ScrambleState;
|
36
|
import org.distorted.objectlib.main.ShapeHexahedron;
|
37
|
|
38
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
39
|
|
40
|
public class TwistySkewb extends ShapeHexahedron
|
41
|
{
|
42
|
static final Static3D[] ROT_AXIS = new Static3D[]
|
43
|
{
|
44
|
new Static3D(+SQ3/3,+SQ3/3,+SQ3/3),
|
45
|
new Static3D(+SQ3/3,+SQ3/3,-SQ3/3),
|
46
|
new Static3D(+SQ3/3,-SQ3/3,+SQ3/3),
|
47
|
new Static3D(+SQ3/3,-SQ3/3,-SQ3/3)
|
48
|
};
|
49
|
|
50
|
private ScrambleState[] mStates;
|
51
|
private int[] mBasicAngle;
|
52
|
private float[][] mCuts;
|
53
|
|
54
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
55
|
|
56
|
public TwistySkewb(int[] numL, int meshState, Static4D quat, Static3D move, float scale, InputStream stream)
|
57
|
{
|
58
|
super(numL, meshState, 2*numL[0]-2, quat, move, scale, stream);
|
59
|
}
|
60
|
|
61
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
62
|
|
63
|
public ScrambleState[] getScrambleStates()
|
64
|
{
|
65
|
if( mStates==null )
|
66
|
{
|
67
|
int[] numLayers = getNumLayers();
|
68
|
int numL = numLayers[0];
|
69
|
|
70
|
int[] tmp = {0,-1,0, 0,1,0, numL-1,-1,0, numL-1,1,0 };
|
71
|
|
72
|
mStates = new ScrambleState[]
|
73
|
{
|
74
|
new ScrambleState( new int[][] {tmp,tmp,tmp,tmp} )
|
75
|
};
|
76
|
}
|
77
|
|
78
|
return mStates;
|
79
|
}
|
80
|
|
81
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
82
|
|
83
|
private int getNumCorners()
|
84
|
{
|
85
|
return 8;
|
86
|
}
|
87
|
|
88
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
89
|
|
90
|
private int getNumEdges(int numLayers)
|
91
|
{
|
92
|
return (numLayers-2)*12;
|
93
|
}
|
94
|
|
95
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
96
|
|
97
|
private int getNumCentersPerFace(int numLayers)
|
98
|
{
|
99
|
return ((numLayers-2)*(numLayers-2) + (numLayers-1)*(numLayers-1));
|
100
|
}
|
101
|
|
102
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
103
|
|
104
|
public float[][] getCuts(int[] numLayers)
|
105
|
{
|
106
|
if( mCuts==null )
|
107
|
{
|
108
|
float[] c = numLayers[0]==2 ? (new float[] {0.0f}) : (new float[] {-SQ3/6,+SQ3/6});
|
109
|
mCuts = new float[][] {c,c,c,c};
|
110
|
}
|
111
|
|
112
|
return mCuts;
|
113
|
}
|
114
|
|
115
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
116
|
|
117
|
public boolean[][] getLayerRotatable(int[] numLayers)
|
118
|
{
|
119
|
boolean[] tmp = numLayers[0]==2 ? (new boolean[] {true,true}) : (new boolean[] {true,false,true});
|
120
|
return new boolean[][] { tmp,tmp,tmp,tmp };
|
121
|
}
|
122
|
|
123
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
124
|
|
125
|
public int getTouchControlType()
|
126
|
{
|
127
|
return TC_HEXAHEDRON;
|
128
|
}
|
129
|
|
130
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
131
|
|
132
|
public int getTouchControlSplit()
|
133
|
{
|
134
|
return TYPE_SPLIT_CORNER;
|
135
|
}
|
136
|
|
137
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
138
|
|
139
|
public int[][][] getEnabled()
|
140
|
{
|
141
|
return new int[][][]
|
142
|
{
|
143
|
{{0,1},{3,1},{2,3},{0,2}},
|
144
|
{{2,3},{3,1},{0,1},{0,2}},
|
145
|
{{1,2},{0,1},{0,3},{2,3}},
|
146
|
{{1,2},{2,3},{0,3},{0,1}},
|
147
|
{{0,3},{0,2},{1,2},{1,3}},
|
148
|
{{1,2},{0,2},{0,3},{1,3}},
|
149
|
};
|
150
|
}
|
151
|
|
152
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
153
|
|
154
|
public float[] getDist3D(int[] numLayers)
|
155
|
{
|
156
|
return TouchControlHexahedron.D3D;
|
157
|
}
|
158
|
|
159
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
160
|
|
161
|
public Static3D[] getFaceAxis()
|
162
|
{
|
163
|
return TouchControlHexahedron.FACE_AXIS;
|
164
|
}
|
165
|
|
166
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
167
|
|
168
|
public float[][] getCubitPositions(int[] numLayers)
|
169
|
{
|
170
|
int numL = numLayers[0];
|
171
|
final float DIST_CORNER = numL-1;
|
172
|
final float DIST_EDGE = numL-1;
|
173
|
final float DIST_CENTER = numL-1;
|
174
|
|
175
|
final int numCorners = getNumCorners();
|
176
|
final int numEdges = getNumEdges(numL);
|
177
|
final int numCenters = 6*getNumCentersPerFace(numL);
|
178
|
|
179
|
final float[][] CENTERS = new float[numCorners+numEdges+numCenters][];
|
180
|
|
181
|
/// CORNERS //////////////////////////////////////////////
|
182
|
|
183
|
CENTERS[0] = new float[] { DIST_CORNER, DIST_CORNER, DIST_CORNER };
|
184
|
CENTERS[1] = new float[] { DIST_CORNER, DIST_CORNER,-DIST_CORNER };
|
185
|
CENTERS[2] = new float[] { DIST_CORNER,-DIST_CORNER, DIST_CORNER };
|
186
|
CENTERS[3] = new float[] { DIST_CORNER,-DIST_CORNER,-DIST_CORNER };
|
187
|
CENTERS[4] = new float[] {-DIST_CORNER, DIST_CORNER, DIST_CORNER };
|
188
|
CENTERS[5] = new float[] {-DIST_CORNER, DIST_CORNER,-DIST_CORNER };
|
189
|
CENTERS[6] = new float[] {-DIST_CORNER,-DIST_CORNER, DIST_CORNER };
|
190
|
CENTERS[7] = new float[] {-DIST_CORNER,-DIST_CORNER,-DIST_CORNER };
|
191
|
|
192
|
/// CENTERS //////////////////////////////////////////////
|
193
|
|
194
|
int index=8;
|
195
|
|
196
|
final float X= -1000.0f;
|
197
|
final float Y= -1001.0f;
|
198
|
|
199
|
final float[][] centerTable =
|
200
|
{
|
201
|
{+DIST_CENTER,X,Y},
|
202
|
{-DIST_CENTER,X,Y},
|
203
|
{X,+DIST_CENTER,Y},
|
204
|
{X,-DIST_CENTER,Y},
|
205
|
{X,Y,+DIST_CENTER},
|
206
|
{X,Y,-DIST_CENTER}
|
207
|
};
|
208
|
|
209
|
float x,y, cen0, cen1, cen2;
|
210
|
|
211
|
for( float[] centers : centerTable )
|
212
|
{
|
213
|
x = 2-numL;
|
214
|
|
215
|
for(int i=0; i<numL-1; i++, x+=2)
|
216
|
{
|
217
|
y = 2-numL;
|
218
|
|
219
|
for(int j=0; j<numL-1; j++, y+=2, index++)
|
220
|
{
|
221
|
if( centers[0]==Y ) cen0 = y;
|
222
|
else if( centers[0]==X ) cen0 = x;
|
223
|
else cen0 = centers[0];
|
224
|
|
225
|
if( centers[1]==Y ) cen1 = y;
|
226
|
else if( centers[1]==X ) cen1 = x;
|
227
|
else cen1 = centers[1];
|
228
|
|
229
|
if( centers[2]==Y ) cen2 = y;
|
230
|
else if( centers[2]==X ) cen2 = x;
|
231
|
else cen2 = centers[2];
|
232
|
|
233
|
CENTERS[index] = new float[] {cen0,cen1,cen2};
|
234
|
}
|
235
|
}
|
236
|
|
237
|
x = 3-numL;
|
238
|
|
239
|
for(int i=0; i<numL-2; i++, x+=2)
|
240
|
{
|
241
|
y = 3-numL;
|
242
|
|
243
|
for(int j=0; j<numL-2; j++, y+=2, index++)
|
244
|
{
|
245
|
if( centers[0]==Y ) cen0 = y;
|
246
|
else if( centers[0]==X ) cen0 = x;
|
247
|
else cen0 = centers[0];
|
248
|
|
249
|
if( centers[1]==Y ) cen1 = y;
|
250
|
else if( centers[1]==X ) cen1 = x;
|
251
|
else cen1 = centers[1];
|
252
|
|
253
|
if( centers[2]==Y ) cen2 = y;
|
254
|
else if( centers[2]==X ) cen2 = x;
|
255
|
else cen2 = centers[2];
|
256
|
|
257
|
CENTERS[index] = new float[] {cen0,cen1,cen2};
|
258
|
}
|
259
|
}
|
260
|
}
|
261
|
|
262
|
/// EDGES ///////////////////////////////////////////////
|
263
|
|
264
|
final float[][] edgeTable =
|
265
|
{
|
266
|
{0,+DIST_EDGE,+DIST_EDGE},
|
267
|
{+DIST_EDGE,0,+DIST_EDGE},
|
268
|
{0,-DIST_EDGE,+DIST_EDGE},
|
269
|
{-DIST_EDGE,0,+DIST_EDGE},
|
270
|
{+DIST_EDGE,+DIST_EDGE,0},
|
271
|
{+DIST_EDGE,-DIST_EDGE,0},
|
272
|
{-DIST_EDGE,-DIST_EDGE,0},
|
273
|
{-DIST_EDGE,+DIST_EDGE,0},
|
274
|
{0,+DIST_EDGE,-DIST_EDGE},
|
275
|
{+DIST_EDGE,0,-DIST_EDGE},
|
276
|
{0,-DIST_EDGE,-DIST_EDGE},
|
277
|
{-DIST_EDGE,0,-DIST_EDGE}
|
278
|
};
|
279
|
|
280
|
for (float[] edges : edgeTable)
|
281
|
{
|
282
|
float c = 3-numL;
|
283
|
|
284
|
for (int j=0; j<numL-2; j++, c+=2, index++)
|
285
|
{
|
286
|
CENTERS[index] = new float[] { edges[0]==0 ? c : edges[0] ,
|
287
|
edges[1]==0 ? c : edges[1] ,
|
288
|
edges[2]==0 ? c : edges[2] };
|
289
|
}
|
290
|
}
|
291
|
|
292
|
return CENTERS;
|
293
|
}
|
294
|
|
295
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
296
|
|
297
|
public Static4D getCubitQuats(int cubit, int[] numLayers)
|
298
|
{
|
299
|
int numL = numLayers[0];
|
300
|
int numCorners = getNumCorners();
|
301
|
int numCentersPerFace = getNumCentersPerFace(numL);
|
302
|
int numCenters = 6*numCentersPerFace;
|
303
|
|
304
|
if( cubit<numCorners )
|
305
|
{
|
306
|
switch(cubit)
|
307
|
{
|
308
|
case 0: return mObjectQuats[0]; // unit quat
|
309
|
case 1: return new Static4D( SQ2/2,0,0,SQ2/2); // 90 along X
|
310
|
case 2: return new Static4D(-SQ2/2,0,0,SQ2/2); // -90 along X
|
311
|
case 3: return mObjectQuats[9]; // 180 along X
|
312
|
case 4: return new Static4D(0, SQ2/2,0,SQ2/2); // 90 along Y
|
313
|
case 5: return mObjectQuats[11]; // 180 along Y
|
314
|
case 6: return mObjectQuats[10]; // 180 along Z
|
315
|
case 7: return new Static4D(SQ2/2,0,-SQ2/2,0); // 180 along (SQ2/2,0,-SQ2/2)
|
316
|
}
|
317
|
}
|
318
|
else if( cubit<numCorners+numCenters )
|
319
|
{
|
320
|
int center = (cubit-numCorners)/numCentersPerFace;
|
321
|
|
322
|
switch(center)
|
323
|
{
|
324
|
case 0: return new Static4D(0,-SQ2/2,0,SQ2/2); // -90 along Y
|
325
|
case 1: return new Static4D(0, SQ2/2,0,SQ2/2); // 90 along Y
|
326
|
case 2: return new Static4D( SQ2/2,0,0,SQ2/2); // 90 along X
|
327
|
case 3: return new Static4D(-SQ2/2,0,0,SQ2/2); // -90 along X
|
328
|
case 4: return mObjectQuats[0]; // unit quaternion
|
329
|
case 5: return mObjectQuats[9]; // 180 along X
|
330
|
}
|
331
|
}
|
332
|
else
|
333
|
{
|
334
|
int edge = (cubit-numCorners-numCenters)/(numL-2);
|
335
|
|
336
|
switch(edge)
|
337
|
{
|
338
|
case 0: return mObjectQuats[ 0];
|
339
|
case 1: return mObjectQuats[ 2];
|
340
|
case 2: return mObjectQuats[10];
|
341
|
case 3: return mObjectQuats[ 8];
|
342
|
case 4: return mObjectQuats[ 1];
|
343
|
case 5: return mObjectQuats[ 4];
|
344
|
case 6: return mObjectQuats[ 6];
|
345
|
case 7: return mObjectQuats[ 7];
|
346
|
case 8: return mObjectQuats[11];
|
347
|
case 9: return mObjectQuats[ 5];
|
348
|
case 10: return mObjectQuats[ 9];
|
349
|
case 11: return mObjectQuats[ 3];
|
350
|
}
|
351
|
}
|
352
|
|
353
|
return null;
|
354
|
}
|
355
|
|
356
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
357
|
|
358
|
public ObjectShape getObjectShape(int variant)
|
359
|
{
|
360
|
if( variant==0 )
|
361
|
{
|
362
|
float[][] vertices= { {-1,0,0},{0,-1,0},{0,0,-1},{-1,-1,-1},{0,0,0} };
|
363
|
int[][] indices = { {0,1,4},{2,0,4},{1,2,4},{3,1,0},{3,2,1},{3,0,2} };
|
364
|
return new ObjectShape(vertices, indices);
|
365
|
}
|
366
|
else if( variant==1 )
|
367
|
{
|
368
|
float[][] vertices= { {-1,0,0},{0,-1,0},{1,0,0},{0,1,0},{0,0,-1} };
|
369
|
int[][] indices = { {0,1,2,3},{4,1,0},{4,2,1},{4,3,2},{4,0,3} };
|
370
|
return new ObjectShape(vertices, indices);
|
371
|
}
|
372
|
else
|
373
|
{
|
374
|
float[][] vertices= { {-1,0,0},{1,0,0},{0,-1,0},{0,0,-1} };
|
375
|
int[][] indices = { {2,1,0},{3,0,1},{2,3,1},{3,2,0} };
|
376
|
return new ObjectShape(vertices, indices);
|
377
|
}
|
378
|
}
|
379
|
|
380
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
381
|
|
382
|
public ObjectFaceShape getObjectFaceShape(int variant)
|
383
|
{
|
384
|
int numL = getNumLayers()[0];
|
385
|
|
386
|
if( variant==0 )
|
387
|
{
|
388
|
int N = numL==2 ? 7:5;
|
389
|
int E1= numL==2 ? 3:2;
|
390
|
int E2= numL==2 ? 5:3;
|
391
|
float[][] bands = { {0.020f,35,0.16f,0.7f,N,E1,E1}, {0.000f, 0,1.00f,0.0f,3,1,E2} };
|
392
|
int[] bandIndices = { 0,0,0,1,1,1 };
|
393
|
float[][] corners = { {0.05f,0.25f}, {0.05f,0.20f} };
|
394
|
int[] cornerIndices = { 1,1,1,0,0 };
|
395
|
float[][] centers = { {-0.5f, -0.5f, -0.5f} };
|
396
|
int[] centerIndices = { 0,0,0,-1,0 };
|
397
|
return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
|
398
|
}
|
399
|
else if( variant==1 )
|
400
|
{
|
401
|
int N = numL==2 ? 7:6;
|
402
|
int E = numL==2 ? 3:1;
|
403
|
float[][] bands = { {0.04f,35,SQ2/8,0.9f,N,E,E}, {0.000f,0,1,0.0f,3,0,0} };
|
404
|
int[] bandIndices = { 0,1,1,1,1 };
|
405
|
float[][] corners = { {0.06f,0.15f} };
|
406
|
int[] cornerIndices = { 0,0,0,0,0 };
|
407
|
float[][] centers = { {0,0,-0.4f} };
|
408
|
int[] centerIndices = { 0,0,0,0,-1 };
|
409
|
return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
|
410
|
}
|
411
|
else
|
412
|
{
|
413
|
int N = numL==2 ? 7:5;
|
414
|
int E = numL==2 ? 5:2;
|
415
|
float[][] bands = { {0.035f,30,0.16f,0.8f,N,2,E}, {0.020f,45,0.16f,0.2f,3,1,2} };
|
416
|
int[] bandIndices = { 0,0,1,1 };
|
417
|
float[][] corners = { {0.07f,0.20f}, {0.02f,0.30f} };
|
418
|
int[] cornerIndices = { 0,0,1,1 };
|
419
|
float[][] centers = { {0.0f, -0.5f, -0.5f} };
|
420
|
int[] centerIndices = { 0,0,0,0 };
|
421
|
return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
|
422
|
}
|
423
|
}
|
424
|
|
425
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
426
|
|
427
|
public int getNumCubitVariants(int[] numLayers)
|
428
|
{
|
429
|
return numLayers[0]==2 ? 2:3;
|
430
|
}
|
431
|
|
432
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
433
|
|
434
|
public int getCubitVariant(int cubit, int[] numLayers)
|
435
|
{
|
436
|
return cubit<8 ? 0 : (cubit<8+6*getNumCentersPerFace(numLayers[0]) ? 1:2);
|
437
|
}
|
438
|
|
439
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
440
|
|
441
|
public float getStickerRadius()
|
442
|
{
|
443
|
return 0.08f;
|
444
|
}
|
445
|
|
446
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
447
|
|
448
|
public float getStickerStroke()
|
449
|
{
|
450
|
float stroke = 0.08f;
|
451
|
|
452
|
if( ObjectControl.isInIconMode() )
|
453
|
{
|
454
|
int[] numLayers = getNumLayers();
|
455
|
stroke *= (numLayers[0]==2 ? 2.0f : 2.7f);
|
456
|
}
|
457
|
|
458
|
return stroke;
|
459
|
}
|
460
|
|
461
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
462
|
|
463
|
public float[][] getStickerAngles()
|
464
|
{
|
465
|
return null;
|
466
|
}
|
467
|
|
468
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
469
|
// PUBLIC API
|
470
|
|
471
|
public Static3D[] getRotationAxis()
|
472
|
{
|
473
|
return ROT_AXIS;
|
474
|
}
|
475
|
|
476
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
477
|
|
478
|
public int[] getBasicAngles()
|
479
|
{
|
480
|
if( mBasicAngle ==null ) mBasicAngle = new int[] { 3,3,3,3 };
|
481
|
return mBasicAngle;
|
482
|
}
|
483
|
|
484
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
485
|
|
486
|
public ObjectType intGetObjectType(int[] numLayers)
|
487
|
{
|
488
|
switch(numLayers[0])
|
489
|
{
|
490
|
case 2: return ObjectType.SKEW_2;
|
491
|
case 3: return ObjectType.SKEW_3;
|
492
|
}
|
493
|
|
494
|
return ObjectType.SKEW_2;
|
495
|
}
|
496
|
|
497
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
498
|
|
499
|
public String getObjectName()
|
500
|
{
|
501
|
switch(getNumLayers()[0])
|
502
|
{
|
503
|
case 2: return "Skewb";
|
504
|
case 3: return "Master Skewb";
|
505
|
}
|
506
|
return "Skewb";
|
507
|
}
|
508
|
|
509
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
510
|
|
511
|
public String getInventor()
|
512
|
{
|
513
|
switch(getNumLayers()[0])
|
514
|
{
|
515
|
case 2: return "Tony Durham";
|
516
|
case 3: return "Katsuhiko Okamoto";
|
517
|
}
|
518
|
return "Tony Durham";
|
519
|
}
|
520
|
|
521
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
522
|
|
523
|
public int getYearOfInvention()
|
524
|
{
|
525
|
switch(getNumLayers()[0])
|
526
|
{
|
527
|
case 2: return 1982;
|
528
|
case 3: return 2003;
|
529
|
}
|
530
|
return 1982;
|
531
|
}
|
532
|
|
533
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
534
|
|
535
|
public int getComplexity()
|
536
|
{
|
537
|
switch(getNumLayers()[0])
|
538
|
{
|
539
|
case 2: return 1;
|
540
|
case 3: return 3;
|
541
|
}
|
542
|
return 5;
|
543
|
}
|
544
|
|
545
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
546
|
|
547
|
public String[][] getTutorials()
|
548
|
{
|
549
|
int[] numLayers = getNumLayers();
|
550
|
|
551
|
switch(numLayers[0])
|
552
|
{
|
553
|
case 2: return new String[][] {
|
554
|
{"gb","I6132yshkeU","How to Solve the Skewb","Z3"},
|
555
|
{"es","wxQX3HhPgds","Resolver Skewb (Principiantes)","Cuby"},
|
556
|
{"ru","EICw3aqn6Bc","Как собрать Скьюб?","Алексей Ярыгин"},
|
557
|
{"fr","lR-GuIroh4k","Comment réussir le skewb","Rachma Nikov"},
|
558
|
{"de","7RX6D5pznOk","Skewb lösen","Pezcraft"},
|
559
|
{"pl","ofRu1fByNpk","Jak ułożyć: Skewb","DżoDżo"},
|
560
|
{"br","mNycauwshWs","Como resolver o Skewb","Pedro Filho"},
|
561
|
{"kr","5R3sU-_bMAI","SKEWB 초보 공식","iamzoone"},
|
562
|
// {"tw","8srf9xhsS9k","Skewb斜轉方塊解法","1hrBLD"},
|
563
|
};
|
564
|
case 3: return new String[][] {
|
565
|
{"gb","Jiuf7zQyPYI","Master Skewb Cube Tutorial","Bearded Cubing"},
|
566
|
{"es","8TP6p63KQCA","Master Skewb en Español","jorlozCubes"},
|
567
|
{"ru","7155QSp3T74","часть 1: Как собрать мастер Скьюб","Иван Циков"},
|
568
|
{"ru","14ey-RihjgY","часть 2: Как собрать мастер Скьюб","Иван Циков"},
|
569
|
{"ru","watq6TLa5_E","часть 2.5: Как собрать мастер Скьюб","Иван Циков"},
|
570
|
{"ru","UnsvseFBXmo","часть 3: Как собрать мастер Скьюб","Иван Циков"},
|
571
|
{"fr","tYMoY4EOHVA","Résolution du Master Skewb","Asthalis"},
|
572
|
{"de","LSErzqGNElI","Master Skewb lösen","JamesKnopf"},
|
573
|
{"pl","Y7l3AYFvDJI","Master Skewb TUTORIAL PL","MrUk"},
|
574
|
{"kr","ycR-WmXJCG0","마스터 스큐브 3번째 해법","듀나메스 큐브 해법연구소"},
|
575
|
};
|
576
|
}
|
577
|
return null;
|
578
|
}
|
579
|
}
|