Project

General

Profile

Download (32.8 KB) Statistics
| Branch: | Revision:

distorted-objectlib / src / main / java / org / distorted / objectlib / objects / TwistyCuboid.java @ 76de8309

1 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2019 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6 6133be67 Leszek Koltunski
// 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 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
9
10
package org.distorted.objectlib.objects;
11
12 c9c71c3f Leszek Koltunski
import static org.distorted.objectlib.touchcontrol.TouchControl.TC_CUBOID;
13
import static org.distorted.objectlib.touchcontrol.TouchControl.TYPE_NOT_SPLIT;
14 29b82486 Leszek Koltunski
15
import org.distorted.library.type.Static3D;
16
import org.distorted.library.type.Static4D;
17
18 84a17011 Leszek Koltunski
import org.distorted.objectlib.helpers.FactoryCubit;
19 3ee1d662 Leszek Koltunski
import org.distorted.objectlib.helpers.ObjectFaceShape;
20 1d581993 Leszek Koltunski
import org.distorted.objectlib.helpers.ObjectSignature;
21 84a17011 Leszek Koltunski
import org.distorted.objectlib.helpers.ObjectVertexEffects;
22 cf93ea4e Leszek Koltunski
import org.distorted.objectlib.main.InitAssets;
23 2dffaf22 Leszek Koltunski
import org.distorted.objectlib.main.ObjectSignatures;
24 9ba7f3f6 Leszek Koltunski
import org.distorted.objectlib.scrambling.ScrambleEdgeGenerator;
25 a8295031 Leszek Koltunski
import org.distorted.objectlib.main.InitData;
26 c9c71c3f Leszek Koltunski
import org.distorted.objectlib.touchcontrol.TouchControlCuboids;
27 8005e762 Leszek Koltunski
import org.distorted.objectlib.main.ObjectType;
28 198c5bf0 Leszek Koltunski
import org.distorted.objectlib.helpers.ObjectShape;
29 b31249d6 Leszek Koltunski
import org.distorted.objectlib.shape.ShapeHexahedron;
30 29b82486 Leszek Koltunski
31
///////////////////////////////////////////////////////////////////////////////////////////////////
32
33 386af988 Leszek Koltunski
public class TwistyCuboid extends ShapeHexahedron
34 29b82486 Leszek Koltunski
{
35 ccd8a6f2 Leszek Koltunski
  static final Static3D[] ROT_AXIS = new Static3D[]
36 29b82486 Leszek Koltunski
         {
37
           new Static3D(1,0,0),
38
           new Static3D(0,1,0),
39
           new Static3D(0,0,1)
40
         };
41
42 9ba7f3f6 Leszek Koltunski
  private int[][] mEdges;
43 29b82486 Leszek Koltunski
  private float[][] mCuts;
44 beee90ab Leszek Koltunski
  private int[][] mBasicAngle;
45 29b82486 Leszek Koltunski
46
///////////////////////////////////////////////////////////////////////////////////////////////////
47
48 cf93ea4e Leszek Koltunski
  public TwistyCuboid(int meshState, int iconMode, Static4D quat, Static3D move, float scale, InitData data, InitAssets asset)
49 29b82486 Leszek Koltunski
    {
50 cf93ea4e Leszek Koltunski
    super(meshState, iconMode, (data.getNumLayers()[0]+data.getNumLayers()[1]+data.getNumLayers()[2])/3.0f, quat, move, scale, data, asset);
51 29b82486 Leszek Koltunski
    }
52
53 ed0988c0 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
54
// we need to explicitly provide the quaternion group because the Cuboids do not have the whole
55
// group and it would crash in getCubitQuats()
56
57
  @Override
58
  public Static4D[] getQuats()
59
    {
60
    return new Static4D[]
61
      {
62
        new Static4D(  0.0f,  0.0f,  0.0f, 1.0f ),
63
        new Static4D( SQ2/2,  0.0f,  0.0f, SQ2/2),
64
        new Static4D(  1.0f,  0.0f,  0.0f, 0.0f ),
65
        new Static4D( SQ2/2,  0.0f,  0.0f,-SQ2/2),
66
        new Static4D(  0.0f, SQ2/2,  0.0f, SQ2/2),
67
        new Static4D(  0.0f,  1.0f,  0.0f,  0.0f),
68
        new Static4D(  0.0f, SQ2/2,  0.0f,-SQ2/2),
69
        new Static4D(  0.0f,  0.0f, SQ2/2, SQ2/2),
70
        new Static4D(  0.0f,  0.0f,  1.0f,  0.0f),
71
        new Static4D(  0.0f,  0.0f, SQ2/2,-SQ2/2),
72
        new Static4D(  0.5f,  0.5f, -0.5f,  0.5f),
73
        new Static4D(  0.0f, SQ2/2,-SQ2/2,  0.0f),
74
        new Static4D( -0.5f,  0.5f, -0.5f, -0.5f),
75
        new Static4D(  0.5f,  0.5f,  0.5f,  0.5f),
76
        new Static4D(  0.0f, SQ2/2, SQ2/2,  0.0f),
77
        new Static4D( -0.5f,  0.5f,  0.5f, -0.5f),
78
        new Static4D( SQ2/2,  0.0f,-SQ2/2,  0.0f),
79
        new Static4D(-SQ2/2,  0.0f,-SQ2/2,  0.0f),
80
        new Static4D( SQ2/2, SQ2/2,  0.0f,  0.0f),
81
        new Static4D(-SQ2/2, SQ2/2,  0.0f,  0.0f),
82
        new Static4D(  0.5f, -0.5f, -0.5f, -0.5f),
83
        new Static4D( -0.5f, -0.5f, -0.5f,  0.5f),
84
        new Static4D(  0.5f,  0.5f, -0.5f, -0.5f),
85
        new Static4D( -0.5f,  0.5f, -0.5f,  0.5f),
86
      };
87
    }
88
89 dfdb26a9 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
90
91 9ba7f3f6 Leszek Koltunski
  public int[][] getScrambleEdges()
92 dfdb26a9 Leszek Koltunski
    {
93 9ba7f3f6 Leszek Koltunski
    if( mEdges==null )
94 29b82486 Leszek Koltunski
      {
95 d6998705 Leszek Koltunski
      int[] numLayers = getNumLayers();
96
97
      int X = numLayers[0];
98
      int Y = numLayers[1];
99
      int Z = numLayers[2];
100
101 4a5157a1 Leszek Koltunski
      if( X>1 && Y>1 && Z>1 )
102
        {
103 9ba7f3f6 Leszek Koltunski
        mEdges = ScrambleEdgeGenerator.getScrambleEdgesCuboid(X,Y,Z);
104 4a5157a1 Leszek Koltunski
        }
105
      else
106 29b82486 Leszek Koltunski
        {
107 9ba7f3f6 Leszek Koltunski
        int size = 3*(X+Y+Z);
108
        int[] edge = new int[2*size];
109
110
        for(int i=0; i<size; i++)
111 4a5157a1 Leszek Koltunski
          {
112 9ba7f3f6 Leszek Koltunski
          edge[2*i  ] = i;
113
          edge[2*i+1] = 0;
114
          }
115 4a5157a1 Leszek Koltunski
116 9ba7f3f6 Leszek Koltunski
        mEdges = new int[][] { edge };
117
        }
118 29b82486 Leszek Koltunski
      }
119
120 9ba7f3f6 Leszek Koltunski
    return mEdges;
121 29b82486 Leszek Koltunski
    }
122
123
///////////////////////////////////////////////////////////////////////////////////////////////////
124
125 84a17011 Leszek Koltunski
  private float[][] getVertices(int variant)
126 29b82486 Leszek Koltunski
    {
127 84a17011 Leszek Koltunski
    return new float[][]
128 29b82486 Leszek Koltunski
          {
129 57ef6378 Leszek Koltunski
              { 0.5f, 0.5f, 0.5f },
130
              { 0.5f, 0.5f,-0.5f },
131
              { 0.5f,-0.5f, 0.5f },
132
              { 0.5f,-0.5f,-0.5f },
133
              {-0.5f, 0.5f, 0.5f },
134
              {-0.5f, 0.5f,-0.5f },
135
              {-0.5f,-0.5f, 0.5f },
136
              {-0.5f,-0.5f,-0.5f },
137 29b82486 Leszek Koltunski
          };
138 84a17011 Leszek Koltunski
    }
139 29b82486 Leszek Koltunski
140 84a17011 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
141
142
  public ObjectShape getObjectShape(int variant)
143
    {
144 4e9f2df5 Leszek Koltunski
    int[][] indices =
145 29b82486 Leszek Koltunski
          {
146
              {2,3,1,0},
147
              {7,6,4,5},
148
              {4,0,1,5},
149
              {7,3,2,6},
150
              {6,2,0,4},
151
              {3,7,5,1}
152
          };
153
154 84a17011 Leszek Koltunski
    return new ObjectShape(getVertices(variant), indices);
155 3ee1d662 Leszek Koltunski
    }
156
157
///////////////////////////////////////////////////////////////////////////////////////////////////
158
159
  public ObjectFaceShape getObjectFaceShape(int variant)
160
    {
161 84a17011 Leszek Koltunski
    int[] indices;
162 3ee1d662 Leszek Koltunski
    int extraI, extraV, num, numL = getNumLayers()[0];
163 3bf19410 Leszek Koltunski
    float height = isInIconMode() ? 0.001f : 0.045f;
164 3ee1d662 Leszek Koltunski
165
    switch(numL)
166
        {
167 3bf19410 Leszek Koltunski
        case 2 : num = 6; extraI = 2; extraV = 2; break;
168
        case 3 : num = 5; extraI = 2; extraV = 2; break;
169
        case 4 : num = 5; extraI = 1; extraV = 1; break;
170
        default: num = 5; extraI = 0; extraV = 0; break;
171 3ee1d662 Leszek Koltunski
        }
172
173 4e9f2df5 Leszek Koltunski
    float[][] bands  =
174 1ca2704b Leszek Koltunski
         {
175 2402d0ff Leszek Koltunski
             {height,35,0.5f,0.7f,num,extraI,extraV},
176 846b69f3 Leszek Koltunski
             {0.001f,35,0.5f,0.7f,  2, num-2,extraV},
177
             {0.001f,35,0.5f,0.7f,  2,     0,     0},
178
             {0.001f,35,0.5f,0.7f,num,extraI,extraV},
179 1ca2704b Leszek Koltunski
         };
180 fdccfe1e Leszek Koltunski
181 84a17011 Leszek Koltunski
         if( variant==0 ) indices = new int[] {3,0,3,0,3,0};
182
    else if( variant==1 ) indices = new int[] {1,1,1,0,1,0};
183
    else                  indices = new int[] {2,2,2,2,0,2};
184 1ca2704b Leszek Koltunski
185 84a17011 Leszek Koltunski
    return new ObjectFaceShape(bands,indices, null);
186
    }
187
188
///////////////////////////////////////////////////////////////////////////////////////////////////
189
190
  public ObjectVertexEffects getVertexEffects(int variant)
191
    {
192
    float[][] corners= { {0.036f,0.12f} };
193
    float[][] centers= { {0.0f, 0.0f, 0.0f} };
194
    int[] indices    = { 0,0,0,0,0,0,0,0 };
195
    return FactoryCubit.generateVertexEffect(getVertices(variant),corners,indices,centers,indices);
196 29b82486 Leszek Koltunski
    }
197
198 fdccfe1e Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
199
200
  private int getEdgeNum(int cubit, int[] numLayers)
201
    {
202
    int x = numLayers[0];
203
    int y = numLayers[1];
204
    int z = numLayers[2];
205
206
    if(x==1 || y==1 || z==1 ) return 0;
207
208
    int numCorners = getNumCorners(numLayers);
209
    int numEdges   = getNumEdges(numLayers);
210
    int num = cubit - numCorners;
211
212
    if( num>=0 && num<numEdges )
213
      {
214
      int numLR = (x-2);
215
      if( num<  numLR ) return 0;
216
      if( num<2*numLR ) return 1;
217
      if( num<3*numLR ) return 2;
218
      if( num<4*numLR ) return 3;
219
      num -= 4*numLR;
220
221
      int numTD = (y-2);
222
      if( num<  numTD ) return 4;
223
      if( num<2*numTD ) return 5;
224
      if( num<3*numTD ) return 6;
225
      if( num<4*numTD ) return 7;
226
      num -= 4*numTD;
227
228
      int numFB = (z-2);
229
      if( num<  numFB ) return 8;
230
      if( num<2*numFB ) return 9;
231
      if( num<3*numFB ) return 10;
232
      if( num<4*numFB ) return 11;
233
      }
234
235
    return -1;
236
    }
237
238 dfdb26a9 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
239
240
  private int getCenterNum(int cubit, int[] numLayers)
241
    {
242 fdccfe1e Leszek Koltunski
    int numCorners = getNumCorners(numLayers);
243
    int numEdges   = getNumEdges(numLayers);
244
    int num = cubit - numCorners - numEdges;
245 dfdb26a9 Leszek Koltunski
246
    if( num>=0 )
247
      {
248
      int numLR = (numLayers[1]-2)*(numLayers[2]-2);
249
      if( num<  numLR ) return 0;
250
      if( num<2*numLR ) return 1;
251
      num -= 2*numLR;
252
253
      int numTD = (numLayers[0]-2)*(numLayers[2]-2);
254
      if( num<  numTD ) return 2;
255
      if( num<2*numTD ) return 3;
256
      num -= 2*numTD;
257
258
      int numFB = (numLayers[0]-2)*(numLayers[1]-2);
259
      if( num<  numFB ) return 4;
260
      if( num<2*numFB ) return 5;
261
      }
262
263
    return -1;
264
    }
265
266
///////////////////////////////////////////////////////////////////////////////////////////////////
267
268 fdccfe1e Leszek Koltunski
  private int getNumCorners(int[] numLayers)
269
    {
270
    int x = numLayers[0];
271
    int y = numLayers[1];
272
    int z = numLayers[2];
273
274
    return ( x==1 || y==1 || z==1 ) ? x*y*z : 8;
275
    }
276
277
///////////////////////////////////////////////////////////////////////////////////////////////////
278
279
  private int getNumEdges(int[] numLayers)
280 dfdb26a9 Leszek Koltunski
    {
281
    int x = numLayers[0];
282
    int y = numLayers[1];
283
    int z = numLayers[2];
284
285 fdccfe1e Leszek Koltunski
    return ( x==1 || y==1 || z==1 ) ? x*y*z : 4*( (x-2)+(y-2)+(z-2) );
286 dfdb26a9 Leszek Koltunski
    }
287
288 8da6b1c9 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
289
290 7b832206 Leszek Koltunski
  public float[][] getCubitPositions(int[] numLayers)
291 8da6b1c9 Leszek Koltunski
    {
292 dfdb26a9 Leszek Koltunski
    final int X = numLayers[0];
293
    final int Y = numLayers[1];
294
    final int Z = numLayers[2];
295
296
    final float lenX = 0.5f*(X-1);
297
    final float lenY = 0.5f*(Y-1);
298
    final float lenZ = 0.5f*(Z-1);
299 8da6b1c9 Leszek Koltunski
300 a135652b Leszek Koltunski
    int curPos = 0;
301
302
    if( X==1 )
303
      {
304
      float[][] pos = new float[X*Y*Z][];
305
306
      for(int y=0; y<Y; y++)
307
        for(int z=0; z<Z; z++) pos[curPos++] = new float[] {+lenX,y-lenY,z-lenZ};
308
309
      return pos;
310
      }
311
312
    if( Y==1 )
313 dfdb26a9 Leszek Koltunski
      {
314 a135652b Leszek Koltunski
      float[][] pos = new float[X*Y*Z][];
315
316
      for(int x=0; x<X; x++)
317
        for(int z=0; z<Z; z++) pos[curPos++] = new float[] {x-lenX,+lenY,z-lenZ};
318
319
      return pos;
320
      }
321
322
    if( Z==1 )
323
      {
324
      float[][] pos = new float[X*Y*Z][];
325
326
      for(int x=0; x<X; x++)
327
        for(int y=0; y<Y; y++) pos[curPos++] = new float[] {x-lenX,y-lenY,+lenZ};
328 dfdb26a9 Leszek Koltunski
329 a135652b Leszek Koltunski
      return pos;
330 dfdb26a9 Leszek Koltunski
      }
331 a57e6870 Leszek Koltunski
332 dfdb26a9 Leszek Koltunski
    int numCubits = X*Y*Z - (X-2)*(Y-2)*(Z-2);
333 a135652b Leszek Koltunski
    float[][] pos = new float[numCubits][];
334
335
    pos[curPos++] = new float[] {-lenX,-lenY,-lenZ};
336
    pos[curPos++] = new float[] {-lenX,-lenY,+lenZ};
337
    pos[curPos++] = new float[] {-lenX,+lenY,-lenZ};
338
    pos[curPos++] = new float[] {-lenX,+lenY,+lenZ};
339
    pos[curPos++] = new float[] {+lenX,-lenY,-lenZ};
340
    pos[curPos++] = new float[] {+lenX,-lenY,+lenZ};
341
    pos[curPos++] = new float[] {+lenX,+lenY,-lenZ};
342
    pos[curPos++] = new float[] {+lenX,+lenY,+lenZ};
343
344
    for(int i=1; i<X-1; i++) pos[curPos++] = new float[] { i-lenX,  -lenY,  -lenZ };
345
    for(int i=1; i<X-1; i++) pos[curPos++] = new float[] { i-lenX,  -lenY,  +lenZ };
346
    for(int i=1; i<X-1; i++) pos[curPos++] = new float[] { i-lenX,  +lenY,  -lenZ };
347
    for(int i=1; i<X-1; i++) pos[curPos++] = new float[] { i-lenX,  +lenY,  +lenZ };
348
    for(int i=1; i<Y-1; i++) pos[curPos++] = new float[] {  -lenX, i-lenY,  -lenZ };
349
    for(int i=1; i<Y-1; i++) pos[curPos++] = new float[] {  -lenX, i-lenY,  +lenZ };
350
    for(int i=1; i<Y-1; i++) pos[curPos++] = new float[] {  +lenX, i-lenY,  -lenZ };
351
    for(int i=1; i<Y-1; i++) pos[curPos++] = new float[] {  +lenX, i-lenY,  +lenZ };
352
    for(int i=1; i<Z-1; i++) pos[curPos++] = new float[] {  -lenX,  -lenY, i-lenZ };
353
    for(int i=1; i<Z-1; i++) pos[curPos++] = new float[] {  -lenX,  +lenY, i-lenZ };
354
    for(int i=1; i<Z-1; i++) pos[curPos++] = new float[] {  +lenX,  -lenY, i-lenZ };
355
    for(int i=1; i<Z-1; i++) pos[curPos++] = new float[] {  +lenX,  +lenY, i-lenZ };
356 dfdb26a9 Leszek Koltunski
357
    for(int y=1; y<Y-1; y++)
358 a135652b Leszek Koltunski
      for(int z=1; z<Z-1; z++) pos[curPos++] = new float[] {+lenX,y-lenY,z-lenZ};
359 dfdb26a9 Leszek Koltunski
360
    for(int y=1; y<Y-1; y++)
361 a135652b Leszek Koltunski
      for(int z=1; z<Z-1; z++) pos[curPos++] = new float[] {-lenX,y-lenY,z-lenZ};
362 dfdb26a9 Leszek Koltunski
363
    for(int x=1; x<X-1; x++)
364 a135652b Leszek Koltunski
      for(int z=1; z<Z-1; z++) pos[curPos++] = new float[] {x-lenX,+lenY,z-lenZ};
365 dfdb26a9 Leszek Koltunski
366
    for(int x=1; x<X-1; x++)
367 a135652b Leszek Koltunski
      for(int z=1; z<Z-1; z++) pos[curPos++] = new float[] {x-lenX,-lenY,z-lenZ};
368 dfdb26a9 Leszek Koltunski
369
    for(int x=1; x<X-1; x++)
370 a135652b Leszek Koltunski
      for(int y=1; y<Y-1; y++) pos[curPos++] = new float[] {x-lenX,y-lenY,+lenZ};
371 dfdb26a9 Leszek Koltunski
372
    for(int x=1; x<X-1; x++)
373 a135652b Leszek Koltunski
      for(int y=1; y<Y-1; y++) pos[curPos++] = new float[] {x-lenX,y-lenY,-lenZ};
374 8da6b1c9 Leszek Koltunski
375 a135652b Leszek Koltunski
    return pos;
376 8da6b1c9 Leszek Koltunski
    }
377
378 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
379
380 d0e6cf7f Leszek Koltunski
  public Static4D getCubitQuats(int cubit, int[] numLayers)
381 29b82486 Leszek Koltunski
    {
382 fdccfe1e Leszek Koltunski
    int variant = getCubitVariant(cubit,numLayers);
383 8da6b1c9 Leszek Koltunski
384 fdccfe1e Leszek Koltunski
    switch(variant)
385 8da6b1c9 Leszek Koltunski
      {
386 73a95dfd Leszek Koltunski
      case 0: switch(cubit)
387
                {
388
                case 0: return mObjectQuats[ 0];
389
                case 1: return mObjectQuats[18];
390
                case 2: return mObjectQuats[17];
391
                case 3: return mObjectQuats[ 2];
392
                case 4: return mObjectQuats[14];
393
                case 5: return mObjectQuats[ 5];
394
                case 6: return mObjectQuats[ 8];
395
                case 7: return mObjectQuats[11];
396
                }
397 fdccfe1e Leszek Koltunski
      case 1: int edgeEdge   = getEdgeNum(cubit,numLayers);
398
              switch(edgeEdge)
399
                {
400 9357dae7 Leszek Koltunski
                case  0: return mObjectQuats[ 0];
401
                case  1: return mObjectQuats[ 1];
402
                case  2: return mObjectQuats[ 3];
403
                case  3: return mObjectQuats[ 2];
404
                case  4: return mObjectQuats[21];
405
                case  5: return mObjectQuats[18];
406
                case  6: return mObjectQuats[20];
407
                case  7: return mObjectQuats[19];
408
                case  8: return mObjectQuats[13];
409
                case  9: return mObjectQuats[17];
410
                case 10: return mObjectQuats[15];
411
                case 11: return mObjectQuats[16];
412 fdccfe1e Leszek Koltunski
                }
413
              break;
414
      case 2: int centerFace = getCenterNum(cubit,numLayers);
415
              switch(centerFace)
416
                {
417 9357dae7 Leszek Koltunski
                case 0 : return mObjectQuats[ 6];
418
                case 1 : return mObjectQuats[ 4];
419
                case 2 : return mObjectQuats[ 1];
420
                case 3 : return mObjectQuats[ 3];
421
                case 4 : return mObjectQuats[ 0];
422
                case 5 : return mObjectQuats[ 2];
423 fdccfe1e Leszek Koltunski
                }
424 8da6b1c9 Leszek Koltunski
      }
425 fdccfe1e Leszek Koltunski
426 9357dae7 Leszek Koltunski
    return mObjectQuats[0];
427 29b82486 Leszek Koltunski
    }
428
429
///////////////////////////////////////////////////////////////////////////////////////////////////
430
431 e30c522a Leszek Koltunski
  public int getNumCubitVariants(int[] numLayers)
432 29b82486 Leszek Koltunski
    {
433 fdccfe1e Leszek Koltunski
    final int X = numLayers[0];
434
    final int Y = numLayers[1];
435
    final int Z = numLayers[2];
436
437
    if( X==1 || Y==1 || Z==1 ) return 1;
438
    if( X<=2 && Y<=2 && Z<=2 ) return 1;
439
440
    return 3;
441 29b82486 Leszek Koltunski
    }
442
443
///////////////////////////////////////////////////////////////////////////////////////////////////
444
445 e30c522a Leszek Koltunski
  public int getCubitVariant(int cubit, int[] numLayers)
446 29b82486 Leszek Koltunski
    {
447 fdccfe1e Leszek Koltunski
    int numCorners = getNumCorners(numLayers);
448
    if( cubit < numCorners          ) return 0;
449
    int numEdges = getNumEdges(numLayers);
450
    if( cubit < numCorners+numEdges ) return 1;
451
452
    return 2;
453 8da6b1c9 Leszek Koltunski
    }
454
455 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
456
457 7bbfc84f Leszek Koltunski
  public float[][] getCuts(int[] numLayers)
458 29b82486 Leszek Koltunski
    {
459
    if( mCuts==null )
460
      {
461 dfdb26a9 Leszek Koltunski
      mCuts = new float[3][];
462
463 ba6d9ee9 Leszek Koltunski
      for(int axis=0; axis<3; axis++)
464 dfdb26a9 Leszek Koltunski
        {
465 ba6d9ee9 Leszek Koltunski
        int len = numLayers[axis];
466
        float start = (2-len)*0.5f;
467 29b82486 Leszek Koltunski
468 ba6d9ee9 Leszek Koltunski
        if( len>=2 )
469
          {
470
          mCuts[axis] = new float[len-1];
471
          for(int i=0; i<len-1; i++) mCuts[axis][i] = start+i;
472
          }
473 29b82486 Leszek Koltunski
        }
474
      }
475
476
    return mCuts;
477
    }
478
479
///////////////////////////////////////////////////////////////////////////////////////////////////
480
481 59c20632 Leszek Koltunski
  public boolean[][] getLayerRotatable(int[] numLayers)
482 29b82486 Leszek Koltunski
    {
483 59c20632 Leszek Koltunski
    int numAxis = ROT_AXIS.length;
484
    boolean[][] layerRotatable = new boolean[numAxis][];
485 a57e6870 Leszek Koltunski
486 59c20632 Leszek Koltunski
    for(int i=0; i<numAxis; i++)
487
      {
488
      layerRotatable[i] = new boolean[numLayers[i]];
489
      for(int j=0; j<numLayers[i]; j++) layerRotatable[i][j] = true;
490 29b82486 Leszek Koltunski
      }
491
492 59c20632 Leszek Koltunski
    return layerRotatable;
493 29b82486 Leszek Koltunski
    }
494
495
///////////////////////////////////////////////////////////////////////////////////////////////////
496
497 11fa413d Leszek Koltunski
  public int getTouchControlType()
498 29b82486 Leszek Koltunski
    {
499 ede746af Leszek Koltunski
    return TC_CUBOID;
500 29b82486 Leszek Koltunski
    }
501
502
///////////////////////////////////////////////////////////////////////////////////////////////////
503
504 11fa413d Leszek Koltunski
  public int getTouchControlSplit()
505 29b82486 Leszek Koltunski
    {
506 59c20632 Leszek Koltunski
    return TYPE_NOT_SPLIT;
507 29b82486 Leszek Koltunski
    }
508
509
///////////////////////////////////////////////////////////////////////////////////////////////////
510
511 59c20632 Leszek Koltunski
  public int[][][] getEnabled()
512 29b82486 Leszek Koltunski
    {
513 1b7ece90 Leszek Koltunski
    return new int[][][] { {{1,2}},{{1,2}},{{0,2}},{{0,2}},{{0,1}},{{0,1}} };
514 29b82486 Leszek Koltunski
    }
515
516
///////////////////////////////////////////////////////////////////////////////////////////////////
517
518 59c20632 Leszek Koltunski
  public float[] getDist3D(int[] numLayers)
519 29b82486 Leszek Koltunski
    {
520 b1f0d55d Leszek Koltunski
    float x = numLayers[0];
521
    float y = numLayers[1];
522
    float z = numLayers[2];
523
    float a = (x+y+z)/1.5f;
524 ab31cf6f Leszek Koltunski
525 b1f0d55d Leszek Koltunski
    return new float[] {x/a,x/a,y/a,y/a,z/a,z/a};
526 59c20632 Leszek Koltunski
    }
527 ab31cf6f Leszek Koltunski
528 4c9ca251 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
529
530
  public Static3D[] getFaceAxis()
531
    {
532 1b7ece90 Leszek Koltunski
    return TouchControlCuboids.FACE_AXIS;
533 59c20632 Leszek Koltunski
    }
534
535 3d766df3 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
536
537 d53fb890 Leszek Koltunski
  public float getStickerRadius()
538 3d766df3 Leszek Koltunski
    {
539
    return 0.10f;
540
    }
541
542
///////////////////////////////////////////////////////////////////////////////////////////////////
543
544 d53fb890 Leszek Koltunski
  public float getStickerStroke()
545 3d766df3 Leszek Koltunski
    {
546
    float stroke = 0.08f;
547
548 3bf19410 Leszek Koltunski
    if( isInIconMode() )
549 3d766df3 Leszek Koltunski
      {
550
      int[] numLayers = getNumLayers();
551
552
      switch(numLayers[0])
553
        {
554
        case 2: stroke*=1.8f; break;
555
        case 3: stroke*=2.0f; break;
556
        case 4: stroke*=2.1f; break;
557
        default:stroke*=2.2f; break;
558
        }
559
      }
560
561
    return stroke;
562
    }
563
564 00f4980d Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
565
566 d53fb890 Leszek Koltunski
  public float[][] getStickerAngles()
567 00f4980d Leszek Koltunski
    {
568
    return null;
569
    }
570
571 59c20632 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
572
// PUBLIC API
573
574
  public Static3D[] getRotationAxis()
575
    {
576
    return ROT_AXIS;
577 29b82486 Leszek Koltunski
    }
578
579
///////////////////////////////////////////////////////////////////////////////////////////////////
580
581 5f54927b Leszek Koltunski
  public String getShortName()
582 29b82486 Leszek Koltunski
    {
583 5f54927b Leszek Koltunski
    int[] numLayers = getNumLayers();
584 dfdb26a9 Leszek Koltunski
585 5f54927b Leszek Koltunski
    int x = numLayers[0];
586
    int y = numLayers[1];
587
588
    switch(x)
589
      {
590
      case 2: switch(y)
591
                {
592
                case 2: return ObjectType.CUBE_2.name();
593
                case 3: return ObjectType.CU_232.name();
594
                }
595
      case 3: switch(y)
596
                {
597
                case 2: return ObjectType.CU_323.name();
598
                case 3: return ObjectType.CUBE_3.name();
599
                case 4: return ObjectType.CU_343.name();
600
                }
601
      case 4: return ObjectType.CUBE_4.name();
602
      case 5: return ObjectType.CUBE_5.name();
603
      case 6: return ObjectType.CUBE_6.name();
604
      case 7: return ObjectType.CUBE_7.name();
605 dfdb26a9 Leszek Koltunski
      }
606 5f54927b Leszek Koltunski
607
    return ObjectType.CUBE_3.name();
608 29b82486 Leszek Koltunski
    }
609
610 61aa85e4 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
611
612 1d581993 Leszek Koltunski
  public ObjectSignature getSignature()
613 61aa85e4 Leszek Koltunski
    {
614 5f54927b Leszek Koltunski
    int[] numLayers = getNumLayers();
615
616 b19a1d32 Leszek Koltunski
    int x = numLayers[0];
617
    int y = numLayers[1];
618
619
    switch(x)
620 61aa85e4 Leszek Koltunski
      {
621 b19a1d32 Leszek Koltunski
      case 2: switch(y)
622
                {
623 2dffaf22 Leszek Koltunski
                case 2: return new ObjectSignature(ObjectSignatures.CUBE_2);
624
                case 3: return new ObjectSignature(ObjectSignatures.CU_232);
625 b19a1d32 Leszek Koltunski
                }
626
      case 3: switch(y)
627
                {
628 2dffaf22 Leszek Koltunski
                case 2: return new ObjectSignature(ObjectSignatures.CU_323);
629
                case 3: return new ObjectSignature(ObjectSignatures.CUBE_3);
630
                case 4: return new ObjectSignature(ObjectSignatures.CU_343);
631 b19a1d32 Leszek Koltunski
                }
632 2dffaf22 Leszek Koltunski
      case 4: return new ObjectSignature(ObjectSignatures.CUBE_4);
633
      case 5: return new ObjectSignature(ObjectSignatures.CUBE_5);
634
      case 6: return new ObjectSignature(ObjectSignatures.CUBE_6);
635
      case 7: return new ObjectSignature(ObjectSignatures.CUBE_7);
636 61aa85e4 Leszek Koltunski
      }
637
638 1d581993 Leszek Koltunski
    return null;
639 5f54927b Leszek Koltunski
    }
640
641
///////////////////////////////////////////////////////////////////////////////////////////////////
642
643 beee90ab Leszek Koltunski
  public int[][] getBasicAngles()
644 5f54927b Leszek Koltunski
    {
645
    if( mBasicAngle==null )
646
      {
647
      int[] num = getNumLayers();
648 beee90ab Leszek Koltunski
      int numX = num[0];
649
      int numY = num[1];
650
      int numZ = num[2];
651
652
      int x = numY==numZ ? 4 : 2;
653
      int y = numX==numZ ? 4 : 2;
654
      int z = numX==numY ? 4 : 2;
655
656
      int[] tmpX = new int[numX];
657
      for(int i=0; i<numX; i++) tmpX[i] = x;
658
      int[] tmpY = new int[numY];
659
      for(int i=0; i<numY; i++) tmpY[i] = y;
660
      int[] tmpZ = new int[numZ];
661
      for(int i=0; i<numZ; i++) tmpZ[i] = z;
662
663
      mBasicAngle = new int[][] { tmpX,tmpY,tmpZ };
664 5f54927b Leszek Koltunski
      }
665
    return mBasicAngle;
666 61aa85e4 Leszek Koltunski
    }
667
668 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
669
670 e26eb4e7 Leszek Koltunski
  public String getObjectName()
671 29b82486 Leszek Koltunski
    {
672 b4223a92 Leszek Koltunski
    int[] numLayers = getNumLayers();
673
674 5f54927b Leszek Koltunski
    int x = numLayers[0];
675
    int y = numLayers[1];
676
677
    switch(x)
678 29b82486 Leszek Koltunski
      {
679 5f54927b Leszek Koltunski
      case 2: switch(y)
680
                {
681
                case 2: return "Pocket Cube";
682
                case 3: return "Slim Tower";
683
                }
684
      case 3: switch(y)
685
                {
686
                case 2: return "2x2x3 Cuboid";
687
                case 3: return "Rubik Cube";
688
                case 4: return "3x3x4 Cuboid";
689
                }
690
      case 4: return "Rubik's Revenge";
691
      case 5: return "Professor's Cube";
692
      case 6: return "6x6 Cube";
693
      case 7: return "7x7 Cube";
694 29b82486 Leszek Koltunski
      }
695 5f54927b Leszek Koltunski
696 e26eb4e7 Leszek Koltunski
    return "Rubik Cube";
697 29b82486 Leszek Koltunski
    }
698
699
///////////////////////////////////////////////////////////////////////////////////////////////////
700
701 e26eb4e7 Leszek Koltunski
  public String getInventor()
702 29b82486 Leszek Koltunski
    {
703 b4223a92 Leszek Koltunski
    int[] numLayers = getNumLayers();
704
705 5f54927b Leszek Koltunski
    int x = numLayers[0];
706
    int y = numLayers[1];
707
708
    switch(x)
709 29b82486 Leszek Koltunski
      {
710 5f54927b Leszek Koltunski
      case 2: switch(y)
711
                {
712
                case 2: return "Larry Nichols";
713
                case 3: return "Katsuhiko Okamoto";
714
                }
715
      case 3: switch(y)
716
                {
717
                case 2: return "Unknown";
718
                case 3: return "Ernő Rubik";
719
                case 4: return "Cube4You";
720
                }
721
      case 4: return "Péter Sebestény";
722
      case 5: return "Udo Krell";
723
      case 6:
724
      case 7: return "Panagiotis Verdes";
725 29b82486 Leszek Koltunski
      }
726 b4223a92 Leszek Koltunski
727 e26eb4e7 Leszek Koltunski
    return "Ernő Rubik";
728 29b82486 Leszek Koltunski
    }
729
730 59c20632 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
731
732 e26eb4e7 Leszek Koltunski
  public int getYearOfInvention()
733 59c20632 Leszek Koltunski
    {
734 b4223a92 Leszek Koltunski
    int[] numLayers = getNumLayers();
735
736 5f54927b Leszek Koltunski
    int x = numLayers[0];
737
    int y = numLayers[1];
738
739
    switch(x)
740 59c20632 Leszek Koltunski
      {
741 5f54927b Leszek Koltunski
      case 2: switch(y)
742
                {
743
                case 2: return 1970;
744
                case 3: return 2001;
745
                }
746
      case 3: switch(y)
747
                {
748
                case 2: return 0;
749
                case 3: return 1974;
750
                case 4: return 2009;
751
                }
752
      case 4: return 1981;
753
      case 5: return 2002;
754
      case 6:
755
      case 7: return 2008;
756 59c20632 Leszek Koltunski
      }
757 b4223a92 Leszek Koltunski
758 59c20632 Leszek Koltunski
    return 1974;
759
    }
760
761 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
762
763 e26eb4e7 Leszek Koltunski
  public int getComplexity()
764 29b82486 Leszek Koltunski
    {
765 b4223a92 Leszek Koltunski
    int[] numLayers = getNumLayers();
766
767 5f54927b Leszek Koltunski
    int x = numLayers[0];
768
    int y = numLayers[1];
769
770
    switch(x)
771 29b82486 Leszek Koltunski
      {
772 5f54927b Leszek Koltunski
      case 2: switch(y)
773
                {
774
                case 2:
775
                case 3: return 1;
776
                }
777
      case 3: switch(y)
778
                {
779
                case 2:
780
                case 3: return 2;
781
                case 4: return 3;
782
                }
783
      case 4: return 3;
784
      case 5:
785
      case 6:
786
      case 7: return 4;
787 29b82486 Leszek Koltunski
      }
788 5f54927b Leszek Koltunski
789 b4223a92 Leszek Koltunski
    return 2;
790 29b82486 Leszek Koltunski
    }
791 052e0362 Leszek Koltunski
792
///////////////////////////////////////////////////////////////////////////////////////////////////
793
794
  public String[][] getTutorials()
795
    {
796
    int[] numLayers = getNumLayers();
797
798 5f54927b Leszek Koltunski
    int x = numLayers[0];
799
    int y = numLayers[1];
800
801
    switch(x)
802 052e0362 Leszek Koltunski
      {
803 5f54927b Leszek Koltunski
      case 2: switch(y)
804
                {
805
                case 2: return new String[][] {
806 052e0362 Leszek Koltunski
                          {"gb","rJlh5p2wAKA","How to Solve a 2x2 Rubik's Cube","Z3"},
807
                          {"es","f85wqJTIDlw","Resolver cubo de Rubik 2X2","Cuby"},
808
                          {"ru","azC6P3VYFkc","Как собрать кубик 2Х2","Е Бондаренко"},
809
                          {"fr","V1XS993AUuw","Résoudre le cube 2x2","Rachma Nikov"},
810
                          {"de","d8tKa8SRkXw","2x2 Zauberwürfel lösen","Pezcraft"},
811
                          {"pl","haNWdAYWGsY","Jak ułożyć kostkę Rubika 2x2","DżoDżo"},
812
                          {"br","42W6SM17EuM","Como resolver cubo 2x2","Pedro Filho"},
813
                          {"kr","wTMsdWKq6No","2x2 큐브 공식을 이해하는 해법","듀나메스 큐브 해법연구소"},
814 a399e91b Leszek Koltunski
                          {"vn","hZ4Do8BbOPk","Tutorial N.84 - Cube 2x2x2","Duy Thích Rubik"},
815 052e0362 Leszek Koltunski
                     //   {"tw","CfOCXxhCb8U","2x2魔術方塊復原","1hrBLD"},
816
                         };
817 5f54927b Leszek Koltunski
                case 3: return new String[][] {
818 052e0362 Leszek Koltunski
                          {"gb","6dYOrUgFCsc","How to Solve the 2x2x3","Z3"},
819 42003f6e Leszek Koltunski
                          {"es","1G2jpnSY6J4","Resolver 2x2x3","Cuby"},
820 6a8fb4ec Leszek Koltunski
                          {"ru","0L0odBYaKfo","Как собрать Cuboid 2x2x3","Алексей Ярыгин"},
821 052e0362 Leszek Koltunski
                          {"fr","xJdC1PW8v3M","Résolution du 2x2x3","asthalis"},
822
                          {"de","NDjofQ42C9E","2x2x3 - Tutorial","GerCubing"},
823
                          {"pl","RWF-7v5KE74","2x2x3 cube Tutorial PL","MrUK"},
824
                          {"br","W6cp_1Q9SeY","Como resolver o cubóide 2x2x3","Pedro Filho"},
825
                          {"kr","DIaUaxQbJhw","2x2x3 해법","듀나메스 큐브 해법연구소"},
826 a399e91b Leszek Koltunski
                          {"vn","MObar8ebkzg","Tutorial N.135 - 2x2x3 Cuboid","Duy Thích Rubik"},
827 052e0362 Leszek Koltunski
                         };
828 5f54927b Leszek Koltunski
                }
829
      case 3: switch(y)
830
                {
831
                case 2: return new String[][] {
832
                          {"gb","pbv652cE1AU","How To Solve the 3x3x2 ","JRCuber"},
833 42003f6e Leszek Koltunski
                          {"es","5gPFr7HlZ6Y","Resolver 3x3x2 Cubo Domino","Cuby"},
834 5f54927b Leszek Koltunski
                          {"ru","n5-fa1fd2cQ","Как собрать кубоид 3х3х2","RubicsGuide"},
835
                          {"fr","z6xToKiu38M","Résolution du 3x3x2","asthalis"},
836
                          {"de","3qI55VS5MrY","2x3x3 - Tutorial","GerCubing"},
837
                          {"pl","KSs928xIwKg","3x3x2 cube Tutorial PL","MrUK"},
838
                          {"br","RnjJBXOp9DA","Como resolver o cubóide 3x3x2","Pedro Filho"},
839
                          {"kr","E3Oj8bKcTO4","2x3x3 큐보이드해법","듀나메스 큐브 해법연구소"},
840 a399e91b Leszek Koltunski
                          {"vn","XnJJkniJhFM","Hướng Dẫn Giải Rubik 3x3x2","Rubik Cube"},
841 5f54927b Leszek Koltunski
                         };
842
                case 3: return new String[][] {
843 052e0362 Leszek Koltunski
                          {"gb","-8ohoCKN0Zw","How to Solve a Rubik's Cube","Z3"},
844
                          {"es","GyY0OxDk5lI","Resolver cubo de Rubik 3x3","Cuby"},
845
                          {"ru","5S2eq81FRzI","Как собрать кубик рубика","Е Бондаренко"},
846
                          {"fr","T-ASx2wbHVY","Comment résoudre un Rubik's Cube","Le Cube"},
847
                          {"de","epdcq0L3bDE","3x3 Zauberwürfel lösen","Pezcraft"},
848
                          {"pl","cBU9Y729nQM","Jak ułożyć kostkę Rubika 3x3","DżoDżo"},
849
                          {"br","Vdxl7TvX69c","Como resolver cubo 3x3","Pedro Filho"},
850
                          {"kr","PMLG4__npcY","3x3 큐브 기초해법 (파트1)","듀나메스 큐브 해법연구소"},
851
                          {"kr","vbvyjs4Vmoc","3x3 큐브 기초해법 (파트2)","듀나메스 큐브 해법연구소"},
852
                          {"kr","V5eeKu9abCc","3x3 큐브 기초해법 (파트3)","듀나메스 큐브 해법연구소"},
853 a399e91b Leszek Koltunski
                          {"vn","q_ZAmUVX8vM","Hướng Dẫn Giải Rubik 3x3","Rubik Cube"},
854 052e0362 Leszek Koltunski
                     //   {"tw","76NmRQx5CLA","魔術方塊教學","1hrBLD"},
855
                         };
856 5f54927b Leszek Koltunski
                case 4: return new String[][] {
857 052e0362 Leszek Koltunski
                          {"gb","nh8DqpMM3Ro","How to solve the 3x3x4","BeardedCubing"},
858 42003f6e Leszek Koltunski
                          {"es","zQOjGrP07GU","Como resolver 3x3x4 Tutorial","Tutoriales Rubik"},
859 6a8fb4ec Leszek Koltunski
                          {"ru","F3bwe1ikDyo","Как собрать Cuboid 3x3x4","Никита Брулевич"},
860 052e0362 Leszek Koltunski
                          {"fr","_zVedCuN-ds","Résolution du 3x3x4","asthalis"},
861
                          {"de","jQlBZhWD_V8","3x3x4 - Tutorial","GerCubing"},
862
                          {"pl","YaPi8UGLKQQ","3x3x4 cube Tutorial PL","MrUK"},
863 42003f6e Leszek Koltunski
                          {"br","nfeJ1q_OoHU","Cuboid 3x3x4 Tutorial","Cubo da Loucura"},
864 052e0362 Leszek Koltunski
                          {"kr","-kp5r7iXV0M","3x3x4 큐보이드해법","듀나메스 큐브 해법연구소"},
865 a399e91b Leszek Koltunski
                          {"vn","FbI4Xbs88YU","Tutorial N.72 - 3x3x4 Cuboid","Duy Thích Rubik"},
866 052e0362 Leszek Koltunski
                         };
867 5f54927b Leszek Koltunski
                }
868
      case 4: return new String[][] {
869 052e0362 Leszek Koltunski
                          {"gb","RR77Md71Ymc","How to Solve the 4x4 Rubik's Cube","Z3"},
870
                          {"es","d_4xk1r9hxU","Resolver cubo de Rubik 4x4","Cuby"},
871
                          {"ru","v5ytiOyTFSA","Как собрать кубик 4х4","Алексей Ярыгин"},
872
                          {"fr","C83gYXn-zpI","Comment résoudre un Rubik's Cube 4x4","Le Cube"},
873
                          {"de","Z7EmIp-TLN0","4x4 Zauberwürfel lösen","JamesKnopf"},
874
                          {"pl","LiUxNsowXiI","Jak ułożyć kostkę 4x4","DżoDżo"},
875
                          {"br","DQydZR0EHdo","Como resolver cubo 4x4","Pedro Filho"},
876
                          {"kr","5g4QORteCsk","원리로 이해하는 444 큐브 기초 해법","듀나메스 큐브 해법연구소"},
877 a399e91b Leszek Koltunski
                          {"vn","D7F10BGdJ_E","Tutorial N.37 - Cube 4x4x4","Duy Thích Rubik"},
878 052e0362 Leszek Koltunski
                      //    {"tw","HuyaNIUaSqo","4x4魔術方塊復原#1","1hrBLD"},
879
                      //    {"tw","gHho4gJQMXw","4x4魔術方塊復原#2","1hrBLD"},
880
                      //    {"tw","7pbNgXMQxCE","4x4魔術方塊復原#3","1hrBLD"},
881
                      //    {"tw","PZvc5XJ2bLY","4x4魔術方塊復原#4","1hrBLD"},
882
                      //    {"tw","97vDE29lu2o","4x4魔術方塊復原#5","1hrBLD"},
883
                         };
884 5f54927b Leszek Koltunski
      case 5: return new String[][] {
885 052e0362 Leszek Koltunski
                          {"gb","zMkNkXHzQts","How to Solve the 5x5 Rubik's Cube","Z3"},
886
                          {"es","6uaq-xfFs98","Resolver cubo de Rubik 5x5","Cuby"},
887
                          {"ru","UtKsyLk45uA","Как собрать кубик 5x5","Алексей Ярыгин"},
888
                          {"fr","sq14CsrSkbo","Comment résoudre un Rubik's Cube 5x5","Le Cube"},
889
                          {"de","luLwvHDPnrA","5x5 Zauberwürfel lösen","Pezcraft"},
890
                          {"pl","ERsPyWOF7mg","Jak ułożyć kostkę 5x5x5","DżoDżo"},
891
                          {"br","WQospjKXfvQ","Como resolver cubo 5x5","Pedro Filho"},
892
                          {"kr","D46qDaBFWNM","[555큐브]믿고보는영상!","Playon U온돌차"},
893 a399e91b Leszek Koltunski
                          {"vn","vwmC_vRb_4s","Hướng Dẫn Giải Rubik 5x5","Rubik Cube"},
894 052e0362 Leszek Koltunski
                         };
895 5f54927b Leszek Koltunski
      case 6: return new String[][] {
896 052e0362 Leszek Koltunski
                          {"gb","SkZ9UadAOvQ","How to Solve the 6x6 Rubik's Cube","JPerm"},
897
                          {"es","9X-mW6wbnQQ","Resolver cubo de Rubik 6x6","Cuby"},
898
                          {"ru","yqEIek_l-44","Как собрать кубик Рубика 6х6","Алексей Ярыгин"},
899
                          {"fr","xMreDIM3uoU","Comment faire le 6x6x6","Xavier Hornet"},
900
                          {"de","TZFtwL0PZ-s","6x6 Zauberwürfel lösen","Pezcraft"},
901
                          {"pl","ZB4ROiJUb1o","Jak ułożyć kostkę 6x6x6","DżoDżo"},
902 42003f6e Leszek Koltunski
                          {"br","vh9O47fjjxc","Como Resolver o Cubo 6x6","Pedro Filho"},
903 052e0362 Leszek Koltunski
                          {"kr","ZUyDa2_dVFU","6x6 큐브 맞추는 방법","iamzoone"},
904 a399e91b Leszek Koltunski
                          {"vn","tD7VGEGa584","Hướng Dẫn Giải Rubik 6x6","Rubik Cube"},
905 052e0362 Leszek Koltunski
                         };
906 5f54927b Leszek Koltunski
      case 7: return new String[][] {
907 052e0362 Leszek Koltunski
                          {"gb","xpI7jKs4bWQ","7x7 Centers (1/2)","CubeSkills"},
908
                          {"gb","xpI7jKs4bWQ","7x7 Edges & 3x3 Stage (2/2)","CubeSkills"},
909
                          {"es","q43XpYapOR8","Resolver cubo de Rubik 7x7","Cuby"},
910
                          {"ru","w41zK-1qruY","Как собрать кубик Рубика 7х7","Алексей Ярыгин"},
911 6a8fb4ec Leszek Koltunski
                          {"fr","iXNsJ7b-yZc","Comment résoudre le 7x7x7","Xavier Hornet"},
912 052e0362 Leszek Koltunski
                          {"de","XAbEJS5H5Lw","7x7 Zauberwürfel lösen","Pezcraft"},
913
                          {"pl","uN5fH3USUfc","Jak ułożyć kostkę 7x7","Bartłomiej Krokos"},
914
                          {"kr","3wynYMk4eZk","7x7 큐브 맞추는 방법","iamzoone"},
915 a399e91b Leszek Koltunski
                          {"vn","mKlOus6mP7w","Hướng Dẫn Giải Rubik 7x7","Rubik Cube"},
916 052e0362 Leszek Koltunski
                         };
917
      }
918 5f54927b Leszek Koltunski
919 052e0362 Leszek Koltunski
    return null;
920
    }
921 29b82486 Leszek Koltunski
}