Project

General

Profile

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

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

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 java.io.InputStream;
13

    
14
import org.distorted.library.type.Static3D;
15
import org.distorted.library.type.Static4D;
16

    
17
import org.distorted.objectlib.helpers.ObjectSignature;
18
import org.distorted.objectlib.main.InitData;
19
import org.distorted.objectlib.main.ObjectSignatures;
20
import org.distorted.objectlib.main.ObjectType;
21

    
22
///////////////////////////////////////////////////////////////////////////////////////////////////
23

    
24
public class TwistyDino4 extends TwistyDino
25
{
26
  private int[] mFaceMap;
27

    
28
///////////////////////////////////////////////////////////////////////////////////////////////////
29

    
30
  public TwistyDino4(InitData data, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream stream)
31
    {
32
    super(data, meshState, iconMode, quat, move, scale, stream);
33
    }
34

    
35
///////////////////////////////////////////////////////////////////////////////////////////////////
36

    
37
  @Override
38
  public int[][] getSolvedQuats()
39
    {
40
    return null;
41
    }
42

    
43
///////////////////////////////////////////////////////////////////////////////////////////////////
44

    
45
  @Override
46
  public int getSolvedFunctionIndex()
47
    {
48
    return 1;
49
    }
50

    
51
///////////////////////////////////////////////////////////////////////////////////////////////////
52

    
53
  @Override
54
  public int getCubitFaceMap(int cubit, int face)
55
    {
56
    if( mFaceMap==null ) mFaceMap = new int[] { 4, 2, 2, 4, 0, 2, 1, 4, 0, 0, 1, 1 };
57
    return face<2 ? mFaceMap[cubit] : -1;
58
    }
59

    
60
///////////////////////////////////////////////////////////////////////////////////////////////////
61

    
62
  @Override
63
  public boolean shouldResetTextureMaps()
64
    {
65
    return true;
66
    }
67

    
68
///////////////////////////////////////////////////////////////////////////////////////////////////
69

    
70
  public int[][] getScrambleEdges()
71
    {
72
    if( mEdges==null )
73
      {
74
      mEdges = new int[][]
75
        {
76
          {          4,1,5,1, 6,7,7,7,            12,6,13,6,                       22,4,23,4 },  // 0
77
          {                            10,2,11,2,            16,3,17,3, 18,5,19,5            },  // 1
78
          {          4,1,5,1,                     12,6,13,6,                       22,4,23,4 },  // 2
79
          {          4,1,5,1, 6,7,7,7,                                             22,4,23,4 },  // 3
80
          { 0,8,1,8,                   10,2,11,2,            16,3,17,3                       },  // 4
81
          {          4,1,5,1, 6,7,7,7,            12,6,13,6                                  },  // 5
82
          { 0,8,1,8,                   10,2,11,2,                       18,5,19,5            },  // 6
83
          { 0,8,1,8,                                         16,3,17,3, 18,5,19,5            },  // 7
84
          {                   6,7,7,7,            12,6,13,6,                       22,4,23,4 },  // 8
85
        };
86
      }
87

    
88
    return mEdges;
89
    }
90

    
91
///////////////////////////////////////////////////////////////////////////////////////////////////
92

    
93
  public String getShortName()
94
    {
95
    return ObjectType.DIN4_3.name();
96
    }
97

    
98
///////////////////////////////////////////////////////////////////////////////////////////////////
99

    
100
  public ObjectSignature getSignature()
101
    {
102
    return new ObjectSignature(ObjectSignatures.DIN4_3);
103
    }
104

    
105
///////////////////////////////////////////////////////////////////////////////////////////////////
106

    
107
  public String getObjectName()
108
    {
109
    return "Dino Cube (4 color)";
110
    }
111

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

    
114
  public String getInventor()
115
    {
116
    return "Robert Webb";
117
    }
118

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

    
121
  public int getYearOfInvention()
122
    {
123
    return 1985;
124
    }
125

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

    
128
  public String[][] getTutorials()
129
    {
130
    return null;
131
    }
132
}
(12-12/41)