Project

General

Profile

Download (20.2 KB) Statistics
| Branch: | Tag: | Revision:

magiccube / src / main / java / org / distorted / objects / TwistySkewb.java @ 4946b635

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.objects;
21

    
22
import android.content.res.Resources;
23

    
24
import org.distorted.helpers.ObjectShape;
25
import org.distorted.helpers.ObjectSticker;
26
import org.distorted.helpers.ScrambleState;
27
import org.distorted.library.main.DistortedEffects;
28
import org.distorted.library.main.DistortedTexture;
29
import org.distorted.library.mesh.MeshSquare;
30
import org.distorted.library.type.Static3D;
31
import org.distorted.library.type.Static4D;
32
import org.distorted.main.R;
33

    
34
///////////////////////////////////////////////////////////////////////////////////////////////////
35

    
36
public class TwistySkewb extends Twisty6
37
{
38
  static final Static3D[] ROT_AXIS = new Static3D[]
39
         {
40
           new Static3D(+SQ3/3,+SQ3/3,+SQ3/3),
41
           new Static3D(+SQ3/3,+SQ3/3,-SQ3/3),
42
           new Static3D(+SQ3/3,-SQ3/3,+SQ3/3),
43
           new Static3D(+SQ3/3,-SQ3/3,-SQ3/3)
44
         };
45

    
46
  private ScrambleState[] mStates;
47
  private int[] mBasicAngle;
48
  private Static4D[] mQuats;
49
  private float[][] mCuts;
50
  private boolean[][] mLayerRotatable;
51
  private int[][] mCornerMap,mEdgeMap,mCenterMap;
52
  private ObjectSticker[] mStickers;
53
  private Movement mMovement;
54

    
55
///////////////////////////////////////////////////////////////////////////////////////////////////
56

    
57
  TwistySkewb(int size, Static4D quat, DistortedTexture texture,
58
              MeshSquare mesh, DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
59
    {
60
    super(size, 2*size-2, quat, texture, mesh, effects, moves, ObjectList.SKEW, res, scrWidth);
61
    }
62

    
63
///////////////////////////////////////////////////////////////////////////////////////////////////
64

    
65
  ScrambleState[] getScrambleStates()
66
    {
67
    if( mStates==null )
68
      {
69
      int size = getNumLayers();
70
      int[] tmp = {0,-1,0, 0,1,0, size-1,-1,0, size-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 void initializeQuats()
84
    {
85
    mQuats = new Static4D[]
86
         {
87
         new Static4D(  0.0f,  0.0f,  0.0f,  1.0f ),
88
         new Static4D(  1.0f,  0.0f,  0.0f,  0.0f ),
89
         new Static4D(  0.0f,  1.0f,  0.0f,  0.0f ),
90
         new Static4D(  0.0f,  0.0f,  1.0f,  0.0f ),
91

    
92
         new Static4D(  0.5f,  0.5f,  0.5f,  0.5f ),
93
         new Static4D(  0.5f,  0.5f,  0.5f, -0.5f ),
94
         new Static4D(  0.5f,  0.5f, -0.5f,  0.5f ),
95
         new Static4D(  0.5f,  0.5f, -0.5f, -0.5f ),
96
         new Static4D(  0.5f, -0.5f,  0.5f,  0.5f ),
97
         new Static4D(  0.5f, -0.5f,  0.5f, -0.5f ),
98
         new Static4D(  0.5f, -0.5f, -0.5f,  0.5f ),
99
         new Static4D(  0.5f, -0.5f, -0.5f, -0.5f )
100
         };
101
    }
102

    
103
///////////////////////////////////////////////////////////////////////////////////////////////////
104

    
105
  int[] getSolvedQuats(int cubit, int numLayers)
106
    {
107
    if( mQuats==null ) initializeQuats();
108
    int status = retCubitSolvedStatus(cubit,numLayers);
109
    return status<0 ? null : buildSolvedQuats(MovementCornerTwisting.FACE_AXIS[status],mQuats);
110
    }
111

    
112
///////////////////////////////////////////////////////////////////////////////////////////////////
113

    
114
  private int getNumCorners()
115
    {
116
    return 8;
117
    }
118

    
119
///////////////////////////////////////////////////////////////////////////////////////////////////
120

    
121
  private int getNumEdges(int layers)
122
    {
123
    return (layers-2)*12;
124
    }
125

    
126
///////////////////////////////////////////////////////////////////////////////////////////////////
127

    
128
  private int getNumCentersPerFace(int layers)
129
    {
130
    return ((layers-2)*(layers-2) + (layers-1)*(layers-1));
131
    }
132

    
133
///////////////////////////////////////////////////////////////////////////////////////////////////
134

    
135
  Static4D[] getQuats()
136
    {
137
    if( mQuats==null ) initializeQuats();
138
    return mQuats;
139
    }
140

    
141
///////////////////////////////////////////////////////////////////////////////////////////////////
142

    
143
  int getSolvedFunctionIndex()
144
    {
145
    return 0;
146
    }
147

    
148
///////////////////////////////////////////////////////////////////////////////////////////////////
149

    
150
  int getNumStickerTypes(int numLayers)
151
    {
152
    return 3;
153
    }
154

    
155
///////////////////////////////////////////////////////////////////////////////////////////////////
156

    
157
  float[][] getCuts(int numLayers)
158
    {
159
    if( mCuts==null )
160
      {
161
      float[] c = numLayers==2 ? (new float[] {0.0f}) : (new float[] {-SQ3/6,+SQ3/6});
162
      mCuts = new float[][] {c,c,c,c};
163
      }
164

    
165
    return mCuts;
166
    }
167

    
168
///////////////////////////////////////////////////////////////////////////////////////////////////
169

    
170
  private void getLayerRotatable(int numLayers)
171
    {
172
    if( mLayerRotatable==null )
173
      {
174
      int numAxis = ROT_AXIS.length;
175
      boolean[] tmp = numLayers==2 ? (new boolean[] {true,true}) : (new boolean[] {true,false,true});
176
      mLayerRotatable = new boolean[numAxis][];
177
      for(int i=0; i<numAxis; i++) mLayerRotatable[i] = tmp;
178
      }
179
    }
180

    
181
///////////////////////////////////////////////////////////////////////////////////////////////////
182

    
183
  int getNumCubitFaces()
184
    {
185
    return 6;
186
    }
187

    
188
///////////////////////////////////////////////////////////////////////////////////////////////////
189

    
190
  float[][] getCubitPositions(int numLayers)
191
    {
192
    final float DIST_CORNER = numLayers-1;
193
    final float DIST_EDGE   = numLayers-1;
194
    final float DIST_CENTER = numLayers-1;
195

    
196
    final int numCorners = getNumCorners();
197
    final int numEdges   = getNumEdges(numLayers);
198
    final int numCenters = 6*getNumCentersPerFace(numLayers);
199

    
200
    final float[][] CENTERS = new float[numCorners+numEdges+numCenters][];
201

    
202
    /// CORNERS //////////////////////////////////////////////
203

    
204
    CENTERS[0] = new float[] { DIST_CORNER, DIST_CORNER, DIST_CORNER };
205
    CENTERS[1] = new float[] { DIST_CORNER, DIST_CORNER,-DIST_CORNER };
206
    CENTERS[2] = new float[] { DIST_CORNER,-DIST_CORNER, DIST_CORNER };
207
    CENTERS[3] = new float[] { DIST_CORNER,-DIST_CORNER,-DIST_CORNER };
208
    CENTERS[4] = new float[] {-DIST_CORNER, DIST_CORNER, DIST_CORNER };
209
    CENTERS[5] = new float[] {-DIST_CORNER, DIST_CORNER,-DIST_CORNER };
210
    CENTERS[6] = new float[] {-DIST_CORNER,-DIST_CORNER, DIST_CORNER };
211
    CENTERS[7] = new float[] {-DIST_CORNER,-DIST_CORNER,-DIST_CORNER };
212

    
213
    /// EDGES ///////////////////////////////////////////////
214

    
215
    final float[][]  edgeTable =
216
        {
217
            {0,+DIST_EDGE,+DIST_EDGE},
218
            {+DIST_EDGE,0,+DIST_EDGE},
219
            {0,-DIST_EDGE,+DIST_EDGE},
220
            {-DIST_EDGE,0,+DIST_EDGE},
221
            {+DIST_EDGE,+DIST_EDGE,0},
222
            {+DIST_EDGE,-DIST_EDGE,0},
223
            {-DIST_EDGE,-DIST_EDGE,0},
224
            {-DIST_EDGE,+DIST_EDGE,0},
225
            {0,+DIST_EDGE,-DIST_EDGE},
226
            {+DIST_EDGE,0,-DIST_EDGE},
227
            {0,-DIST_EDGE,-DIST_EDGE},
228
            {-DIST_EDGE,0,-DIST_EDGE}
229
        };
230

    
231
    int index=8;
232

    
233
    for (float[] edges : edgeTable)
234
      {
235
      float c = 3-numLayers;
236

    
237
      for (int j=0; j<numLayers-2; j++, c+=2, index++)
238
        {
239
        CENTERS[index] = new float[] { edges[0]==0 ? c : edges[0] ,
240
                                       edges[1]==0 ? c : edges[1] ,
241
                                       edges[2]==0 ? c : edges[2] };
242
        }
243
      }
244

    
245
    /// CENTERS //////////////////////////////////////////////
246

    
247
    final float X= -1000.0f;
248
    final float Y= -1001.0f;
249

    
250
    final float[][]  centerTable =
251
        {
252
            {+DIST_CENTER,X,Y},
253
            {-DIST_CENTER,X,Y},
254
            {X,+DIST_CENTER,Y},
255
            {X,-DIST_CENTER,Y},
256
            {X,Y,+DIST_CENTER},
257
            {X,Y,-DIST_CENTER}
258
        };
259

    
260
    float x,y, cen0, cen1, cen2;
261

    
262
    for( float[] centers : centerTable )
263
      {
264
      x = 2-numLayers;
265

    
266
      for(int i=0; i<numLayers-1; i++, x+=2)
267
        {
268
        y = 2-numLayers;
269

    
270
        for(int j=0; j<numLayers-1; j++, y+=2, index++)
271
          {
272
               if( centers[0]==Y ) cen0 = y;
273
          else if( centers[0]==X ) cen0 = x;
274
          else                     cen0 = centers[0];
275

    
276
               if( centers[1]==Y ) cen1 = y;
277
          else if( centers[1]==X ) cen1 = x;
278
          else                     cen1 = centers[1];
279

    
280
               if( centers[2]==Y ) cen2 = y;
281
          else if( centers[2]==X ) cen2 = x;
282
          else                     cen2 = centers[2];
283

    
284
          CENTERS[index] = new float[] {cen0,cen1,cen2};
285
          }
286
        }
287

    
288
      x = 3-numLayers;
289

    
290
      for(int i=0; i<numLayers-2; i++, x+=2)
291
        {
292
        y = 3-numLayers;
293

    
294
        for(int j=0; j<numLayers-2; j++, y+=2, index++)
295
          {
296
               if( centers[0]==Y ) cen0 = y;
297
          else if( centers[0]==X ) cen0 = x;
298
          else                     cen0 = centers[0];
299

    
300
               if( centers[1]==Y ) cen1 = y;
301
          else if( centers[1]==X ) cen1 = x;
302
          else                     cen1 = centers[1];
303

    
304
               if( centers[2]==Y ) cen2 = y;
305
          else if( centers[2]==X ) cen2 = x;
306
          else                     cen2 = centers[2];
307

    
308
          CENTERS[index] = new float[] {cen0,cen1,cen2};
309
          }
310
        }
311
      }
312

    
313
    return CENTERS;
314
    }
315

    
316
///////////////////////////////////////////////////////////////////////////////////////////////////
317

    
318
  Static4D getQuat(int cubit, int numLayers)
319
    {
320
    if( mQuats==null ) initializeQuats();
321
    int numCorners = getNumCorners();
322
    int numEdges   = getNumEdges(numLayers);
323

    
324
    if( cubit<numCorners )
325
      {
326
      switch(cubit)
327
        {
328
        case  0: return mQuats[0];                         //  unit quat
329
        case  1: return new Static4D( SQ2/2,0,0,SQ2/2);    //  90 along X
330
        case  2: return new Static4D(-SQ2/2,0,0,SQ2/2);    // -90 along X
331
        case  3: return mQuats[1];                         // 180 along X
332
        case  4: return new Static4D(0, SQ2/2,0,SQ2/2);    //  90 along Y
333
        case  5: return mQuats[2];                         // 180 along Y
334
        case  6: return mQuats[3];                         // 180 along Z
335
        case  7: return new Static4D(SQ2/2,0,-SQ2/2,0);    // 180 along (SQ2/2,0,-SQ2/2)
336
        }
337
      }
338
    else if( cubit<numCorners+numEdges )
339
      {
340
      int edge = (cubit-numCorners)/(numLayers-2);
341

    
342
      switch(edge)
343
        {
344
        case  0: return mQuats[ 0];
345
        case  1: return mQuats[ 5];
346
        case  2: return mQuats[ 3];
347
        case  3: return mQuats[11];
348
        case  4: return mQuats[ 4];
349
        case  5: return mQuats[ 7];
350
        case  6: return mQuats[ 9];
351
        case  7: return mQuats[10];
352
        case  8: return mQuats[ 2];
353
        case  9: return mQuats[ 8];
354
        case 10: return mQuats[ 1];
355
        case 11: return mQuats[ 6];
356
        }
357
      }
358
    else
359
      {
360
      int center = (cubit-numCorners-numEdges)/getNumCentersPerFace(numLayers);
361

    
362
      switch(center)
363
        {
364
        case 0: return new Static4D(0,-SQ2/2,0,SQ2/2);    // -90 along Y
365
        case 1: return new Static4D(0, SQ2/2,0,SQ2/2);    //  90 along Y
366
        case 2: return new Static4D( SQ2/2,0,0,SQ2/2);    //  90 along X
367
        case 3: return new Static4D(-SQ2/2,0,0,SQ2/2);    // -90 along X
368
        case 4: return mQuats[0];                         //  unit quaternion
369
        case 5: return mQuats[1];                         // 180 along X
370
        }
371
      }
372

    
373
    return null;
374
    }
375

    
376
///////////////////////////////////////////////////////////////////////////////////////////////////
377

    
378
  ObjectShape getObjectShape(int cubit, int numLayers)
379
    {
380
    int variant = getCubitVariant(cubit,numLayers);
381

    
382
    if( variant==0 )
383
      {
384
      double[][] vertices = new double[][] { {-1,0,0},{0,-1,0},{0,0,-1},{-1,-1,-1},{0,0,0} };
385
      int[][] vert_indices = new int[][] { {0,1,4},{2,0,4},{1,2,4},{3,1,0},{3,2,1},{3,0,2} };
386
      int N = numLayers==2 ? 7:5;
387
      int E1= numLayers==2 ? 3:2;
388
      int E2= numLayers==2 ? 5:3;
389
      float[][] bands     = new float[][] { {0.020f,35,0.16f,0.7f,N,E1,E1}, {0.000f, 0,1.00f,0.0f,3,1,E2} };
390
      int[] bandIndices   = new int[] { 0,0,0,1,1,1 };
391
      float[][] corners   = new float[][] { {0.05f,0.25f}, {0.05f,0.20f} };
392
      int[] cornerIndices = new int[] { 1,1,1,0,0 };
393
      float[][] centers   = new float[][] { {-0.5f, -0.5f, -0.5f} };
394
      int[] centerIndices = new int[] { 0,0,0,-1,0 };
395
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
396
      }
397
    else if( variant==1 )
398
      {
399
      double[][] vertices = new double[][] { {-1,0,0},{1,0,0},{0,-1,0},{0,0,-1} };
400
      int[][] vert_indices = new int[][] { {2,1,0},{3,0,1},{2,3,1},{3,2,0} };
401
      int N = numLayers==2 ? 7:5;
402
      int E = numLayers==2 ? 5:2;
403
      float[][] bands     = new float[][] { {0.035f,30,0.16f,0.8f,N,2,E}, {0.020f,45,0.16f,0.2f,3,1,2} };
404
      int[] bandIndices   = new int[] { 0,0,1,1 };
405
      float[][] corners   = new float[][] { {0.07f,0.20f}, {0.02f,0.30f} };
406
      int[] cornerIndices = new int[] { 0,0,1,1 };
407
      float[][] centers   = new float[][] { {0.0f, -0.5f, -0.5f} };
408
      int[] centerIndices = new int[] { 0,0,0,0 };
409
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
410
      }
411
    else
412
      {
413
      double[][] vertices = new double[][] { {-1,0,0},{0,-1,0},{1,0,0},{0,1,0},{0,0,-1} };
414
      int[][] vert_indices = new int[][] { {0,1,2,3},{4,1,0},{4,2,1},{4,3,2},{4,0,3} };
415
      int N = numLayers==2 ? 7:6;
416
      int E = numLayers==2 ? 3:1;
417
      float[][] bands     = new float[][] { {0.04f,35,SQ2/8,0.9f,N,E,E}, {0.000f,0,1,0.0f,3,0,0} };
418
      int[] bandIndices   = new int[] { 0,1,1,1,1 };
419
      float[][] corners   = new float[][] { {0.06f,0.15f} };
420
      int[] cornerIndices = new int[] { 0,0,0,0,0 };
421
      float[][] centers   = new float[][] { {0,0,-0.4f} };
422
      int[] centerIndices = new int[] { 0,0,0,0,-1 };
423
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
424
      }
425
    }
426

    
427
///////////////////////////////////////////////////////////////////////////////////////////////////
428

    
429
  int getNumCubitVariants(int numLayers)
430
    {
431
    return 3;
432
    }
433

    
434
///////////////////////////////////////////////////////////////////////////////////////////////////
435

    
436
  int getCubitVariant(int cubit, int numLayers)
437
    {
438
    int numCorners = getNumCorners();
439
    if( cubit<numCorners ) return 0;
440
    int numEdges = getNumEdges(numLayers);
441
    return cubit<numCorners+numEdges ? 1:2;
442
    }
443

    
444
///////////////////////////////////////////////////////////////////////////////////////////////////
445

    
446
  int getFaceColor(int cubit, int cubitface, int numLayers)
447
    {
448
    if( mCornerMap==null || mEdgeMap==null || mCenterMap==null )
449
      {
450
      mCornerMap = new int[][]
451
         {
452
           {  4, 2, 0, 18,18,18 },
453
           {  2, 5, 0, 18,18,18 },
454
           {  3, 4, 0, 18,18,18 },
455
           {  5, 3, 0, 18,18,18 },
456
           {  1, 2, 4, 18,18,18 },
457
           {  5, 2, 1, 18,18,18 },
458
           {  4, 3, 1, 18,18,18 },
459
           {  1, 3, 5, 18,18,18 },
460
         };
461

    
462
      mEdgeMap = new int[][]
463
         {
464
           { 10, 8, 18,18,18,18 },
465
           {  6,10, 18,18,18,18 },
466
           { 10, 9, 18,18,18,18 },
467
           {  7,10, 18,18,18,18 },
468
           {  8, 6, 18,18,18,18 },
469
           {  9, 6, 18,18,18,18 },
470
           {  9, 7, 18,18,18,18 },
471
           {  8, 7, 18,18,18,18 },
472
           { 11, 8, 18,18,18,18 },
473
           {  6,11, 18,18,18,18 },
474
           { 11, 9, 18,18,18,18 },
475
           {  7,11, 18,18,18,18 }
476
         };
477

    
478
      mCenterMap = new int[][]
479
         {
480
           { 12, 18,18,18,18,18 },
481
           { 13, 18,18,18,18,18 },
482
           { 14, 18,18,18,18,18 },
483
           { 15, 18,18,18,18,18 },
484
           { 16, 18,18,18,18,18 },
485
           { 17, 18,18,18,18,18 },
486
         };
487
      }
488

    
489
    int numCorners = getNumCorners();
490
    int numEdges   = getNumEdges(numLayers);
491

    
492
    if( cubit<numCorners )
493
      {
494
      return mCornerMap[cubit][cubitface];
495
      }
496
    else if( cubit<numCorners+numEdges )
497
      {
498
      int edge = (cubit-numCorners)/(numLayers-2);
499
      return mEdgeMap[edge][cubitface];
500
      }
501
    else
502
      {
503
      int center = (cubit-numCorners-numEdges)/getNumCentersPerFace(numLayers);
504
      return mCenterMap[center][cubitface];
505
      }
506
    }
507

    
508
///////////////////////////////////////////////////////////////////////////////////////////////////
509

    
510
  ObjectSticker retSticker(int face)
511
    {
512
    if( mStickers==null )
513
      {
514
      float[][] STICKERS = new float[][]
515
          {
516
             { -0.5f, 0.25f, 0.25f,  -0.5f, 0.25f, 0.25f  },
517
             { -0.5f, 0.00f, 0.00f,  -0.5f, 0.50f, 0.0f, 0.0f, 0.5f }
518
          };
519

    
520
      final float R1 = 0.025f;
521
      final float R2 = 0.025f;
522
      final float R3 = 0.055f;
523
      final float[][] radii  = { { R1,R1,R1 },{ R2,R2,R2 },{ R3,R3,R3,R3 } };
524
      final float[] strokes = { 0.045f, 0.035f, 0.035f };
525

    
526
      mStickers = new ObjectSticker[STICKERS.length+1];
527

    
528
      for(int s=0; s<STICKERS.length+1; s++)
529
        {
530
        int index = s<2 ? 0:1;
531
        mStickers[s] = new ObjectSticker(STICKERS[index],null,radii[s],strokes[s]);
532
        }
533
      }
534

    
535
    return mStickers[face/NUM_FACE_COLORS];
536
    }
537

    
538
///////////////////////////////////////////////////////////////////////////////////////////////////
539
// PUBLIC API
540

    
541
  public Static3D[] getRotationAxis()
542
    {
543
    return ROT_AXIS;
544
    }
545

    
546
///////////////////////////////////////////////////////////////////////////////////////////////////
547

    
548
  public Movement getMovement()
549
    {
550
    if( mMovement==null )
551
      {
552
      int numLayers = getNumLayers();
553
      if( mCuts==null ) getCuts(numLayers);
554
      getLayerRotatable(numLayers);
555

    
556
      mMovement = new MovementCornerTwisting(mCuts,mLayerRotatable,2*numLayers-2);
557
      }
558
    return mMovement;
559
    }
560

    
561
///////////////////////////////////////////////////////////////////////////////////////////////////
562

    
563
  public int[] getBasicAngle()
564
    {
565
    if( mBasicAngle ==null ) mBasicAngle = new int[] { 3,3,3,3 };
566
    return mBasicAngle;
567
    }
568

    
569
///////////////////////////////////////////////////////////////////////////////////////////////////
570

    
571
  public int getObjectName(int numLayers)
572
    {
573
    switch(numLayers)
574
      {
575
      case 2: return R.string.skew2;
576
      case 3: return R.string.skew3;
577
      }
578
    return R.string.skew2;
579
    }
580

    
581
///////////////////////////////////////////////////////////////////////////////////////////////////
582

    
583
  public int getInventor(int numLayers)
584
    {
585
    switch(numLayers)
586
      {
587
      case 2: return R.string.skew2_inventor;
588
      case 3: return R.string.skew3_inventor;
589
      }
590
    return R.string.skew2_inventor;
591
    }
592

    
593
///////////////////////////////////////////////////////////////////////////////////////////////////
594

    
595
  public int getComplexity(int numLayers)
596
    {
597
    switch(numLayers)
598
      {
599
      case 2: return 4;
600
      case 3: return 8;
601
      }
602
    return 5;
603
    }
604
}
(44-44/48)