Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / objects / TwistyCube.java @ 8396c548

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2019 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is free software: you can redistribute it and/or modify                            //
7
// it under the terms of the GNU General Public License as published by                          //
8
// the Free Software Foundation, either version 2 of the License, or                             //
9
// (at your option) any later version.                                                           //
10
//                                                                                               //
11
// Magic Cube is distributed in the hope that it will be useful,                                 //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14
// GNU General Public License for more details.                                                  //
15
//                                                                                               //
16
// You should have received a copy of the GNU General Public License                             //
17
// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19

    
20
package org.distorted.objectlib.objects;
21

    
22
import static org.distorted.objectlib.main.Movement.TYPE_NOT_SPLIT;
23

    
24
import android.content.res.Resources;
25

    
26
import org.distorted.library.main.DistortedEffects;
27
import org.distorted.library.main.DistortedTexture;
28
import org.distorted.library.mesh.MeshSquare;
29
import org.distorted.library.type.Static3D;
30
import org.distorted.library.type.Static4D;
31

    
32
import org.distorted.objectlib.R;
33
import org.distorted.objectlib.main.Movement;
34
import org.distorted.objectlib.main.Movement6;
35
import org.distorted.objectlib.main.ObjectControl;
36
import org.distorted.objectlib.main.ObjectType;
37
import org.distorted.objectlib.helpers.ObjectShape;
38
import org.distorted.objectlib.helpers.ObjectSticker;
39
import org.distorted.objectlib.helpers.ScrambleState;
40
import org.distorted.objectlib.main.Twisty6;
41

    
42
///////////////////////////////////////////////////////////////////////////////////////////////////
43

    
44
public class TwistyCube extends Twisty6
45
{
46
  static final Static3D[] ROT_AXIS = new Static3D[]
47
         {
48
           new Static3D(1,0,0),
49
           new Static3D(0,1,0),
50
           new Static3D(0,0,1)
51
         };
52

    
53
  private static final int[][][] ENABLED = new int[][][]
54
      {
55
          {{1,2}},{{1,2}},{{0,2}},{{0,2}},{{0,1}},{{0,1}},
56
      };
57

    
58
  private ScrambleState[] mStates;
59
  private Static4D[] mQuats;
60
  private float[][] mCuts;
61
  private boolean[][] mLayerRotatable;
62
  private int[] mBasicAngle;
63
  private ObjectSticker[] mStickers;
64
  private Movement mMovement;
65

    
66
///////////////////////////////////////////////////////////////////////////////////////////////////
67

    
68
  public TwistyCube(int size, Static4D quat, Static3D move, DistortedTexture texture,
69
                    MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
70
    {
71
    super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
72
    }
73

    
74
///////////////////////////////////////////////////////////////////////////////////////////////////
75

    
76
  protected ScrambleState[] getScrambleStates()
77
    {
78
    if( mStates==null )
79
      {
80
      int size = getNumLayers();
81
      int[][] m = new int[16][];
82
      for(int i=1; i<16; i++) m[i] = createEdges(size,i);
83

    
84
      mStates = new ScrambleState[]
85
        {
86
        new ScrambleState( new int[][] { m[ 1], m[ 2], m[ 3] } ),  //  0 0
87
        new ScrambleState( new int[][] {  null, m[ 4], m[ 5] } ),  //  1 x
88
        new ScrambleState( new int[][] { m[ 6],  null, m[ 7] } ),  //  2 y
89
        new ScrambleState( new int[][] { m[ 8], m[ 9],  null } ),  //  3 z
90
        new ScrambleState( new int[][] { m[10],  null, m[ 7] } ),  //  4 xy
91
        new ScrambleState( new int[][] { m[11], m[ 9],  null } ),  //  5 xz
92
        new ScrambleState( new int[][] {  null, m[12], m[ 5] } ),  //  6 yx
93
        new ScrambleState( new int[][] { m[ 8], m[13],  null } ),  //  7 yz
94
        new ScrambleState( new int[][] {  null, m[ 4], m[14] } ),  //  8 zx
95
        new ScrambleState( new int[][] { m[ 6],  null, m[15] } ),  //  9 zy
96
        new ScrambleState( new int[][] {  null,  null, m[ 5] } ),  // 10 xyx
97
        new ScrambleState( new int[][] {  null, m[ 4],  null } ),  // 11 xzx
98
        new ScrambleState( new int[][] {  null,  null, m[ 7] } ),  // 12 yxy
99
        new ScrambleState( new int[][] { m[ 6],  null,  null } ),  // 13 yzy
100
        new ScrambleState( new int[][] {  null, m[ 9],  null } ),  // 14 zxz
101
        new ScrambleState( new int[][] { m[ 8],  null,  null } ),  // 15 zyz
102
        };
103
      }
104

    
105
    return mStates;
106
    }
107

    
108
///////////////////////////////////////////////////////////////////////////////////////////////////
109

    
110
  protected int getResource(int numLayers)
111
    {
112
    switch(numLayers)
113
      {
114
      case 2: return R.raw.cube2;
115
      case 3: return R.raw.cube3;
116
      case 4: return R.raw.cube4;
117
      case 5: return R.raw.cube5;
118
      }
119

    
120
    return 0;
121
    }
122

    
123
///////////////////////////////////////////////////////////////////////////////////////////////////
124

    
125
  private int[] createEdges(int size, int vertex)
126
    {
127
    int[] ret = new int[9*size];
128

    
129
    for(int l=0; l<size; l++)
130
      {
131
      ret[9*l  ] = l;
132
      ret[9*l+1] =-1;
133
      ret[9*l+2] = vertex;
134
      ret[9*l+3] = l;
135
      ret[9*l+4] = 1;
136
      ret[9*l+5] = vertex;
137
      ret[9*l+6] = l;
138
      ret[9*l+7] = 2;
139
      ret[9*l+8] = vertex;
140
      }
141

    
142
    return ret;
143
    }
144

    
145
///////////////////////////////////////////////////////////////////////////////////////////////////
146

    
147
  private void initializeQuats()
148
    {
149
    mQuats = new Static4D[]
150
         {
151
         new Static4D(  0.0f,   0.0f,   0.0f,   1.0f),
152
         new Static4D(  1.0f,   0.0f,   0.0f,   0.0f),
153
         new Static4D(  0.0f,   1.0f,   0.0f,   0.0f),
154
         new Static4D(  0.0f,   0.0f,   1.0f,   0.0f),
155

    
156
         new Static4D( SQ2/2,  SQ2/2,  0.0f ,   0.0f),
157
         new Static4D( SQ2/2, -SQ2/2,  0.0f ,   0.0f),
158
         new Static4D( SQ2/2,   0.0f,  SQ2/2,   0.0f),
159
         new Static4D(-SQ2/2,   0.0f,  SQ2/2,   0.0f),
160
         new Static4D( SQ2/2,   0.0f,   0.0f,  SQ2/2),
161
         new Static4D( SQ2/2,   0.0f,   0.0f, -SQ2/2),
162
         new Static4D(  0.0f,  SQ2/2,  SQ2/2,   0.0f),
163
         new Static4D(  0.0f,  SQ2/2, -SQ2/2,   0.0f),
164
         new Static4D(  0.0f,  SQ2/2,   0.0f,  SQ2/2),
165
         new Static4D(  0.0f,  SQ2/2,   0.0f, -SQ2/2),
166
         new Static4D(  0.0f,   0.0f,  SQ2/2,  SQ2/2),
167
         new Static4D(  0.0f,   0.0f,  SQ2/2, -SQ2/2),
168

    
169
         new Static4D(  0.5f,   0.5f,   0.5f,   0.5f),
170
         new Static4D(  0.5f,   0.5f,  -0.5f,   0.5f),
171
         new Static4D(  0.5f,   0.5f,  -0.5f,  -0.5f),
172
         new Static4D(  0.5f,  -0.5f,   0.5f,  -0.5f),
173
         new Static4D( -0.5f,  -0.5f,  -0.5f,   0.5f),
174
         new Static4D( -0.5f,   0.5f,  -0.5f,  -0.5f),
175
         new Static4D( -0.5f,   0.5f,   0.5f,  -0.5f),
176
         new Static4D( -0.5f,   0.5f,   0.5f,   0.5f)
177
         };
178
    }
179

    
180
///////////////////////////////////////////////////////////////////////////////////////////////////
181

    
182
  protected int[] getSolvedQuats(int cubit, int numLayers)
183
    {
184
    if( mQuats ==null ) initializeQuats();
185
    int status = retCubitSolvedStatus(cubit,numLayers);
186
    return status<0 ? null : buildSolvedQuats(Movement6.FACE_AXIS[status], mQuats);
187
    }
188

    
189
///////////////////////////////////////////////////////////////////////////////////////////////////
190

    
191
  private int getNumCornersAndEdges(int numLayers)
192
    {
193
    return numLayers==1 ? 1 : 12*(numLayers-2) + 8;
194
    }
195

    
196
///////////////////////////////////////////////////////////////////////////////////////////////////
197

    
198
  protected ObjectShape getObjectShape(int cubit, int numLayers)
199
    {
200
    int extraI, extraV, num;
201
    float height;
202
    int variant = getCubitVariant(cubit,numLayers);
203

    
204
    switch(numLayers)
205
        {
206
        case 2 : num = 6; extraI = 2; extraV = 2; height = 0.045f; break;
207
        case 3 : num = 5; extraI = 2; extraV = 2; height = 0.045f; break;
208
        case 4 : num = 5; extraI = 1; extraV = 1; height = 0.045f; break;
209
        default: num = 5; extraI = 0; extraV = 0; height = 0.045f; break;
210
        }
211

    
212
    double[][] vertices = new double[][]
213
          {
214
              { 0.5, 0.5, 0.5 },
215
              { 0.5, 0.5,-0.5 },
216
              { 0.5,-0.5, 0.5 },
217
              { 0.5,-0.5,-0.5 },
218
              {-0.5, 0.5, 0.5 },
219
              {-0.5, 0.5,-0.5 },
220
              {-0.5,-0.5, 0.5 },
221
              {-0.5,-0.5,-0.5 },
222
          };
223

    
224
    int[][] vert_indices = new int[][]
225
          {
226
              {2,3,1,0},
227
              {7,6,4,5},
228
              {4,0,1,5},
229
              {7,3,2,6},
230
              {6,2,0,4},
231
              {3,7,5,1}
232
          };
233

    
234
    float[][] corners   = new float[][] { {0.036f,0.12f} };
235
    int[] cornerIndices = new int[] { 0,0,0,0,0,0,0,0 };
236
    float[][] centers   = new float[][] { {0.0f, 0.0f, 0.0f} };
237
    int[] centerIndices = new int[] { 0,0,0,0,0,0,0,0 };
238

    
239
    if( variant==0 )
240
      {
241
      float[][] bands   = new float[][] { {height,35,0.5f,0.7f,num,extraI,extraV} };
242
      int[] bandIndices = new int[] { 0,0,0,0,0,0};
243
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
244
      }
245
    else
246
      {
247
      int extraI2, extraV2, num2;
248

    
249
      switch(numLayers)
250
        {
251
        case 2 : num2 = 6; extraI2 = 2; extraV2 = 2; break;
252
        case 3 : num2 = 5; extraI2 = 1; extraV2 = 0; break;
253
        case 4 : num2 = 4; extraI2 = 0; extraV2 = 0; break;
254
        default: num2 = 3; extraI2 = 0; extraV2 = 0; break;
255
        }
256

    
257
      float[][] bands   = new float[][] { {height,35,0.5f,0.7f,num,extraI,extraV}, {height,35,0.5f,0.7f,num2,extraI2,extraV2} };
258
      int[] bandIndices = new int[] { 1,1,1,1,0,1};
259
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
260
      }
261
    }
262

    
263
///////////////////////////////////////////////////////////////////////////////////////////////////
264

    
265
  protected float[][] getCubitPositions(int numLayers)
266
    {
267
    if( numLayers==1 ) return new float[][] {{ 0.0f, 0.0f, 0.0f }};
268

    
269
    int numCubits = getNumCornersAndEdges(numLayers) + 6*(numLayers-2)*(numLayers-2);
270
    float[][] tmp = new float[numCubits][];
271

    
272
    final float LEN = 0.5f*(numLayers-1);
273
    int currentPosition = 0;
274

    
275
    tmp[currentPosition++] = new float[] {-LEN,-LEN,-LEN};
276
    tmp[currentPosition++] = new float[] {-LEN,-LEN,+LEN};
277
    tmp[currentPosition++] = new float[] {-LEN,+LEN,-LEN};
278
    tmp[currentPosition++] = new float[] {-LEN,+LEN,+LEN};
279
    tmp[currentPosition++] = new float[] {+LEN,-LEN,-LEN};
280
    tmp[currentPosition++] = new float[] {+LEN,-LEN,+LEN};
281
    tmp[currentPosition++] = new float[] {+LEN,+LEN,-LEN};
282
    tmp[currentPosition++] = new float[] {+LEN,+LEN,+LEN};
283

    
284
    for(int i=1; i<numLayers-1; i++)
285
      tmp[currentPosition++] = new float[] { i-LEN,  -LEN,  -LEN };
286
    for(int i=1; i<numLayers-1; i++)
287
      tmp[currentPosition++] = new float[] { i-LEN,  -LEN,  +LEN };
288
    for(int i=1; i<numLayers-1; i++)
289
      tmp[currentPosition++] = new float[] { i-LEN,  +LEN,  -LEN };
290
    for(int i=1; i<numLayers-1; i++)
291
      tmp[currentPosition++] = new float[] { i-LEN,  +LEN,  +LEN };
292
    for(int i=1; i<numLayers-1; i++)
293
      tmp[currentPosition++] = new float[] {  -LEN, i-LEN,  -LEN };
294
    for(int i=1; i<numLayers-1; i++)
295
      tmp[currentPosition++] = new float[] {  -LEN, i-LEN,  +LEN };
296
    for(int i=1; i<numLayers-1; i++)
297
      tmp[currentPosition++] = new float[] {  +LEN, i-LEN,  -LEN };
298
    for(int i=1; i<numLayers-1; i++)
299
      tmp[currentPosition++] = new float[] {  +LEN, i-LEN,  +LEN };
300
    for(int i=1; i<numLayers-1; i++)
301
      tmp[currentPosition++] = new float[] {  -LEN,  -LEN, i-LEN };
302
    for(int i=1; i<numLayers-1; i++)
303
      tmp[currentPosition++] = new float[] {  -LEN,  +LEN, i-LEN };
304
    for(int i=1; i<numLayers-1; i++)
305
      tmp[currentPosition++] = new float[] {  +LEN,  -LEN, i-LEN };
306
    for(int i=1; i<numLayers-1; i++)
307
      tmp[currentPosition++] = new float[] {  +LEN,  +LEN, i-LEN };
308

    
309
    for(int y=1; y<numLayers-1; y++)
310
      for(int z=1; z<numLayers-1; z++)
311
        tmp[currentPosition++] = new float[] {+LEN,y-LEN,z-LEN};
312

    
313
    for(int y=1; y<numLayers-1; y++)
314
      for(int z=1; z<numLayers-1; z++)
315
        tmp[currentPosition++] = new float[] {-LEN,y-LEN,z-LEN};
316

    
317
    for(int x=1; x<numLayers-1; x++)
318
      for(int z=1; z<numLayers-1; z++)
319
        tmp[currentPosition++] = new float[] {x-LEN,+LEN,z-LEN};
320

    
321
    for(int x=1; x<numLayers-1; x++)
322
      for(int z=1; z<numLayers-1; z++)
323
        tmp[currentPosition++] = new float[] {x-LEN,-LEN,z-LEN};
324

    
325
    for(int x=1; x<numLayers-1; x++)
326
      for(int y=1; y<numLayers-1; y++)
327
        tmp[currentPosition++] = new float[] {x-LEN,y-LEN,+LEN};
328

    
329
    for(int x=1; x<numLayers-1; x++)
330
      for(int y=1; y<numLayers-1; y++)
331
        tmp[currentPosition++] = new float[] {x-LEN,y-LEN,-LEN};
332

    
333
    return tmp;
334
    }
335

    
336
///////////////////////////////////////////////////////////////////////////////////////////////////
337

    
338
  protected Static4D getQuat(int cubit, int numLayers)
339
    {
340
    if( mQuats ==null ) initializeQuats();
341

    
342
    int num = cubit - getNumCornersAndEdges(numLayers);
343

    
344
    if( num>=0 )
345
      {
346
      int face = num/((numLayers-2)*(numLayers-2));
347

    
348
      switch(face)
349
        {
350
        case 0: return mQuats[13];
351
        case 1: return mQuats[12];
352
        case 2: return mQuats[ 8];
353
        case 3: return mQuats[ 9];
354
        case 4: return mQuats[ 0];
355
        case 5: return mQuats[ 1];
356
        }
357
      }
358

    
359
    return mQuats[0];
360
    }
361

    
362
///////////////////////////////////////////////////////////////////////////////////////////////////
363

    
364
  protected int getNumCubitVariants(int numLayers)
365
    {
366
    return numLayers>2 ? 2:1;
367
    }
368

    
369
///////////////////////////////////////////////////////////////////////////////////////////////////
370

    
371
  protected int getCubitVariant(int cubit, int numLayers)
372
    {
373
    return cubit < getNumCornersAndEdges(numLayers) ? 0 : 1;
374
    }
375

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

    
378
  protected int getFaceColor(int cubit, int cubitface, int numLayers)
379
    {
380
    int cornersAndEdges = getNumCornersAndEdges(numLayers);
381

    
382
    if( cubit<cornersAndEdges )
383
      {
384
      return CUBITS[cubit].getRotRow(cubitface/2) == (cubitface%2==0 ? (1<<(numLayers-1)):1) ? cubitface : NUM_TEXTURES;
385
      }
386
    else
387
      {
388
      int numCentersPerFace = (numLayers-2)*(numLayers-2);
389
      return cubitface == 4 ? (cubit-cornersAndEdges)/numCentersPerFace : NUM_TEXTURES;
390
      }
391
    }
392

    
393
///////////////////////////////////////////////////////////////////////////////////////////////////
394

    
395
  protected ObjectSticker retSticker(int face)
396
    {
397
    if( mStickers==null )
398
      {
399
      final float[][] STICKERS = new float[][]  { { -0.5f, -0.5f, 0.5f, -0.5f, 0.5f, 0.5f, -0.5f, 0.5f } };
400
      final float radius = 0.10f;
401
      final float[] radii = {radius,radius,radius,radius};
402
      mStickers = new ObjectSticker[STICKERS.length];
403
      float stroke = 0.08f;
404

    
405
      if( ObjectControl.isInIconMode() )
406
        {
407
        switch(getNumLayers())
408
          {
409
          case 2: stroke*=1.8f; break;
410
          case 3: stroke*=2.0f; break;
411
          case 4: stroke*=2.1f; break;
412
          default:stroke*=2.2f; break;
413
          }
414
        }
415

    
416
      mStickers[0] = new ObjectSticker(STICKERS[0],null,radii,stroke );
417
      }
418

    
419
    return mStickers[face/NUM_FACE_COLORS];
420
    }
421

    
422
///////////////////////////////////////////////////////////////////////////////////////////////////
423

    
424
  protected Static4D[] getQuats()
425
    {
426
    if( mQuats ==null ) initializeQuats();
427
    return mQuats;
428
    }
429

    
430
///////////////////////////////////////////////////////////////////////////////////////////////////
431

    
432
  protected float[][] getCuts(int numLayers)
433
    {
434
    if( numLayers<2 ) return null;
435

    
436
    if( mCuts==null )
437
      {
438
      mCuts = new float[3][numLayers-1];
439

    
440
      for(int i=0; i<numLayers-1; i++)
441
        {
442
        float cut = (2-numLayers)*0.5f + i;
443
        mCuts[0][i] = cut;
444
        mCuts[1][i] = cut;
445
        mCuts[2][i] = cut;
446
        }
447
      }
448

    
449
    return mCuts;
450
    }
451

    
452
///////////////////////////////////////////////////////////////////////////////////////////////////
453

    
454
  private void getLayerRotatable(int numLayers)
455
    {
456
    if( mLayerRotatable==null )
457
      {
458
      int numAxis = ROT_AXIS.length;
459
      boolean[] tmp = new boolean[numLayers];
460
      for(int i=0; i<numLayers; i++) tmp[i] = true;
461
      mLayerRotatable = new boolean[numAxis][];
462
      for(int i=0; i<numAxis; i++) mLayerRotatable[i] = tmp;
463
      }
464
    }
465

    
466
///////////////////////////////////////////////////////////////////////////////////////////////////
467

    
468
  protected int getSolvedFunctionIndex()
469
    {
470
    return 0;
471
    }
472

    
473
///////////////////////////////////////////////////////////////////////////////////////////////////
474

    
475
  protected int getNumStickerTypes(int numLayers)
476
    {
477
    return 1;
478
    }
479

    
480
///////////////////////////////////////////////////////////////////////////////////////////////////
481

    
482
  protected int getNumCubitFaces()
483
    {
484
    return 6;
485
    }
486

    
487
///////////////////////////////////////////////////////////////////////////////////////////////////
488
// PUBLIC API
489

    
490
  public Static3D[] getRotationAxis()
491
    {
492
    return ROT_AXIS;
493
    }
494

    
495
///////////////////////////////////////////////////////////////////////////////////////////////////
496

    
497
  public Movement getMovement()
498
    {
499
    if( mMovement==null )
500
      {
501
      int numLayers = getNumLayers();
502
      if( mCuts==null ) getCuts(numLayers);
503
      getLayerRotatable(numLayers);
504
      mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_NOT_SPLIT,ENABLED);
505
      }
506
    return mMovement;
507
    }
508

    
509
///////////////////////////////////////////////////////////////////////////////////////////////////
510

    
511
  public int[] getBasicAngle()
512
    {
513
    if( mBasicAngle==null ) mBasicAngle = new int[] { 4,4,4 };
514
    return mBasicAngle;
515
    }
516

    
517
///////////////////////////////////////////////////////////////////////////////////////////////////
518

    
519
  public ObjectType intGetObjectType(int numLayers)
520
    {
521
    switch(numLayers)
522
      {
523
      case 2: return ObjectType.CUBE_2;
524
      case 3: return ObjectType.CUBE_3;
525
      case 4: return ObjectType.CUBE_4;
526
      case 5: return ObjectType.CUBE_5;
527
      }
528

    
529
    return ObjectType.CUBE_3;
530
    }
531

    
532
///////////////////////////////////////////////////////////////////////////////////////////////////
533

    
534
  public int getObjectName(int numLayers)
535
    {
536
    switch(numLayers)
537
      {
538
      case 2: return R.string.cube2;
539
      case 3: return R.string.cube3;
540
      case 4: return R.string.cube4;
541
      case 5: return R.string.cube5;
542
      }
543
    return R.string.cube3;
544
    }
545

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

    
548
  public int getInventor(int numLayers)
549
    {
550
    switch(numLayers)
551
      {
552
      case 2: return R.string.cube2_inventor;
553
      case 3: return R.string.cube3_inventor;
554
      case 4: return R.string.cube4_inventor;
555
      case 5: return R.string.cube5_inventor;
556
      }
557
    return R.string.cube3_inventor;
558
    }
559

    
560
///////////////////////////////////////////////////////////////////////////////////////////////////
561

    
562
  public int getComplexity(int numLayers)
563
    {
564
    switch(numLayers)
565
      {
566
      case 2: return 4;
567
      case 3: return 6;
568
      case 4: return 8;
569
      case 5: return 10;
570
      }
571
    return 6;
572
    }
573
}
(6-6/25)