Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / objects / TwistyCuboid.java @ 08a8ebc7

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