Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / objects / TwistyDino4.java @ 3a0990b1

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2020 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// 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
///////////////////////////////////////////////////////////////////////////////////////////////////
9

    
10
package org.distorted.objectlib.objects;
11

    
12
import org.distorted.library.type.Static3D;
13
import org.distorted.library.type.Static4D;
14

    
15
import org.distorted.objectlib.metadata.Metadata;
16
import org.distorted.objectlib.main.InitAssets;
17
import org.distorted.objectlib.metadata.ListObjects;
18

    
19
///////////////////////////////////////////////////////////////////////////////////////////////////
20

    
21
public class TwistyDino4 extends TwistyDino
22
{
23
  private int[] mFaceMap;
24

    
25
///////////////////////////////////////////////////////////////////////////////////////////////////
26

    
27
  public TwistyDino4(int iconMode, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
28
    {
29
    super(iconMode, quat, move, scale, meta, asset);
30
    }
31

    
32
///////////////////////////////////////////////////////////////////////////////////////////////////
33

    
34
  @Override
35
  public int getSolvedFunctionIndex()
36
    {
37
    return 1;
38
    }
39

    
40
///////////////////////////////////////////////////////////////////////////////////////////////////
41

    
42
  @Override
43
  public int getCubitFaceMap(int cubit, int face)
44
    {
45
    if( mFaceMap==null ) mFaceMap = new int[] { 4, 2, 2, 4, 0, 2, 1, 4, 0, 0, 1, 1 };
46
    return face<2 ? mFaceMap[cubit] : -1;
47
    }
48

    
49
///////////////////////////////////////////////////////////////////////////////////////////////////
50

    
51
  @Override
52
  public boolean shouldResetTextureMaps()
53
    {
54
    return true;
55
    }
56

    
57
///////////////////////////////////////////////////////////////////////////////////////////////////
58

    
59
  public int[][] getScrambleEdges()
60
    {
61
    if( mEdges==null )
62
      {
63
      mEdges = new int[][]
64
        {
65
          {          4,1,5,1, 6,7,7,7,            12,6,13,6,                       22,4,23,4 },  // 0
66
          {                            10,2,11,2,            16,3,17,3, 18,5,19,5            },  // 1
67
          {          4,1,5,1,                     12,6,13,6,                       22,4,23,4 },  // 2
68
          {          4,1,5,1, 6,7,7,7,                                             22,4,23,4 },  // 3
69
          { 0,8,1,8,                   10,2,11,2,            16,3,17,3                       },  // 4
70
          {          4,1,5,1, 6,7,7,7,            12,6,13,6                                  },  // 5
71
          { 0,8,1,8,                   10,2,11,2,                       18,5,19,5            },  // 6
72
          { 0,8,1,8,                                         16,3,17,3, 18,5,19,5            },  // 7
73
          {                   6,7,7,7,            12,6,13,6,                       22,4,23,4 },  // 8
74
        };
75
      }
76

    
77
    return mEdges;
78
    }
79

    
80
///////////////////////////////////////////////////////////////////////////////////////////////////
81

    
82
  public String getShortName()
83
    {
84
    return ListObjects.DIN4_3.name();
85
    }
86

    
87
///////////////////////////////////////////////////////////////////////////////////////////////////
88

    
89
  public String[][] getTutorials()
90
    {
91
    return null;
92
    }
93
}
(18-18/59)