Project

General

Profile

« Previous | Next » 

Revision 539b46ea

Added by Leszek Koltunski over 1 year ago

Correct Camouflage's cubits (centers must be 1x1x1!) and add YTS' scrambling algorithms.

View differences:

src/main/java/org/distorted/objectlib/helpers/ObjectSignature.java
123 123
    }
124 124

  
125 125
///////////////////////////////////////////////////////////////////////////////////////////////////
126
// Locally created bandaged cuboids 1<=N,M,K<=5
126
// Locally created bandaged cuboids 1<=N,M,K<=7
127 127
// This is the 'Andreas signature' of a bandaged cube.
128 128
// https://twistypuzzles.com/forum/viewtopic.php?p=415466#p415466
129 129

  
src/main/java/org/distorted/objectlib/main/ObjectType.java
100 100
  DIN4_3 ( TwistyDino4.class          ,  9, R.drawable.din4_3, true,    30, new InitData(new int[] {3,3,3,3})),
101 101

  
102 102
  BAN5_4 ( TwistyBandagedCuboid.class , 48, R.drawable.ban5_4, false,    50, new InitData(new int[] {4,4,4}, TwistyBandagedCuboid.POS_5)),
103
  CA_333 ( TwistyCamouflage.class     , 32, R.drawable.ca_333, false,    50, new InitData(new int[] {4,4,4}, TwistyCamouflage.CAM_333)),
103
  CA_333 ( TwistyCamouflage.class     ,389, R.drawable.ca_333, false,    50, new InitData(new int[] {4,4,4}, TwistyCamouflage.CAM_333)),
104 104

  
105 105
  PDUO_2 ( TwistyPyraminxDuo.class    ,  4, R.drawable.pduo_2, false,    0, new InitData(new int[] {2,2,2,2})),
106 106
  PDIA_3 ( TwistyPyraminxDiamond.class, 12, R.drawable.pdia_3, false,   40, new InitData(new int[] {3,3,3})),
src/main/java/org/distorted/objectlib/objects/TwistyCamouflage.java
42 42

  
43 43
      getCenters( -1.0f,-1.5f,-0.5f, 2, 1, 1),
44 44
      getCenters( -1.0f,-1.5f,-1.5f, 2, 1, 1),
45
      getCenters( -1.0f,-0.5f,-0.5f, 2, 1, 1),
45
      getCenters( -1.5f,-0.5f,-0.5f, 1, 1, 1), // center
46 46
      getCenters( -1.0f,-0.5f,-1.5f, 2, 1, 1),
47 47
      getCenters(  0.5f, 1.0f,-1.5f, 1, 2, 1),
48 48
      getCenters(  1.5f, 1.0f,-1.5f, 1, 2, 1),
49
      getCenters(  0.5f, 1.0f,-0.5f, 1, 2, 1),
49
      getCenters(  0.5f, 1.5f,-0.5f, 1, 1, 1), // center
50 50
      getCenters(  1.5f, 1.0f,-0.5f, 1, 2, 1),
51
      getCenters(  0.5f,-0.5f, 1.0f, 1, 1, 2),
51
      getCenters(  0.5f,-0.5f, 1.5f, 1, 1, 1), // center
52 52
      getCenters(  1.5f,-0.5f, 1.0f, 1, 1, 2),
53 53
      getCenters(  0.5f,-1.5f, 1.0f, 1, 1, 2),
54 54
      getCenters(  1.5f,-1.5f, 1.0f, 1, 1, 2),
......
90 90
    };
91 91

  
92 92
  private int[] mDimsIndices, mOffsIndices;
93
  private int[][] mEdges;
93 94

  
94 95
///////////////////////////////////////////////////////////////////////////////////////////////////
95 96

  
......
135 136
  @Override
136 137
  public int getScrambleType()
137 138
    {
138
    return 2;
139
    return 0;
139 140
    }
140 141

  
141 142
///////////////////////////////////////////////////////////////////////////////////////////////////
142 143

  
143 144
  public int[][] getScrambleEdges()
144 145
    {
145
    return null;
146
    if( mEdges==null )
147
      {
148
      mEdges = new int[][]
149
        {
150
          {0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0}
151
        };
152
      }
153

  
154
    return mEdges;
155
    }
156

  
157
///////////////////////////////////////////////////////////////////////////////////////////////////
158

  
159
  @Override
160
  public int[][] getScrambleAlgorithms()
161
    {
162
    return new int[][]
163
      {
164
        // VTS' algorithm1: ('swap 2 edges and 2 pairs of centers')
165
        {2, 1, 1,  1, 0, 1,  0, 2, 1,  1, 0,-1,  0, 2,-1,
166
         1, 0, 1,  0, 2, 1,  1, 0,-1,  0, 2,-1,  2, 1,-1,
167
         0, 2, 1,  1, 0, 1,  0, 2,-1,  1, 0,-1,  0, 2, 1,
168
         1, 0, 1,  0, 2,-1,  1, 0,-1,  0, 2, 1,  0, 3, 1,
169
         1, 0, 2,  2, 0, 1,  1, 0,-2,  2, 0,-1,  1, 0, 2,
170
         0, 2,-1,  2, 1, 1,  0, 2, 1,  1, 0, 2,  2, 0, 1,
171
         1, 0,-2,  2, 0,-1,  1, 0, 2,  0, 2,-1,  2, 1,-2},
172

  
173
        // algorithm1 rotated around the corner
174
        {1, 1, 1,  0, 2,-1,  2, 0,-1,  0, 2, 1,  2, 0, 1,
175
         0, 2,-1,  2, 0,-1,  0, 2, 1,  2, 0, 1,  1, 1,-1,
176
         2, 0,-1,  0, 2,-1,  2, 0, 1,  0, 2, 1,  2, 0,-1,
177
         0, 2,-1,  2, 0, 1,  0, 2, 1,  2, 1,-1,  2, 0,-1,
178
         0, 2,-2,  1, 0, 1,  0, 2, 2,  1, 0,-1,  0, 2,-2,
179
         2, 0, 1,  1, 1, 1,  2, 0,-1,  0, 2,-2,  1, 0, 1,
180
         0, 2, 2,  1, 0,-1,  0, 2,-2,  2, 0, 1,  1, 1,-2},
181

  
182
        // algorithm1 rotated again around the corner
183
        {0, 2,-1,  2, 0, 1,  1, 0,-1,  2, 0,-1,  1, 0, 1,
184
         2, 0, 1,  1, 0,-1,  2, 0,-1,  1, 0, 1,  0, 2, 1,
185
         1, 0,-1,  2, 0, 1,  1, 0, 1,  2, 0,-1,  1, 0,-1,
186
         2, 0, 1,  1, 0, 1,  2, 0,-1,  1, 1,-1,  1, 0,-1,
187
         2, 0, 2,  0, 2,-1,  2, 0,-2,  0, 2, 1,  2, 0, 2,
188
         1, 0, 1,  0, 2,-1,  1, 0,-1,  2, 0, 2,  0, 2,-1,
189
         2, 0,-2,  0, 2, 1,  2, 0, 2,  1, 0, 1,  0, 2, 2},
190

  
191
       // VTS' algorithm2: swap two 221 edges
192
        {2, 2, 1,  1, 0, 1,  2, 2,-1,  1, 0,-1,  1, 2, 1,
193
         2, 2,-2,  0, 2,-1,  2, 2, 2,  0, 2, 1,  2, 2,-2,
194
         1, 2,-1,  0, 2,-1,  1, 2, 1,  2, 2,-2,  0, 2,-1,
195
         2, 2, 2,  0, 2, 1,  2, 2,-2,  1, 2,-1,  0, 2,-2,
196
         1, 0, 1,  2, 2, 1,  1, 0,-1,  2, 2, -1},
197

  
198
       // algorithm2 rotated around the corner
199
        {0, 0,-1,  2, 0, 1,  0, 0, 1,  2, 0,-1,  2, 2, 1,
200
         0, 0, 2,  1, 0, 1,  0, 0,-2,  1, 0,-1,  0, 0, 2,
201
         2, 2,-1,  1, 1, 1,  2, 2, 1,  0, 0, 2,  1, 0, 1,
202
         0, 0,-2,  1, 0,-1,  0, 0, 2,  2, 2,-1,  1, 1, 2,
203
         2, 0, 1,  0, 0,-1,  2, 0,-1,  0, 0, 1},
204

  
205
       // algorithm2 rotated again around the corner
206
        {1, 2, 1,  0, 2,-1,  1, 2,-1,  0, 2, 1,  0, 0,-1,
207
         1, 2,-2,  2, 0, 1,  1, 2, 2,  2, 0,-1,  1, 2,-2,
208
         0, 0, 1,  2, 1, 1,  0, 0,-1,  1, 2,-2,  2, 0, 1,
209
         1, 2, 2,  2, 0,-1,  1, 2,-2,  0, 0, 1,  2, 1, 2,
210
         0, 2,-1,  1, 2, 1,  0, 2, 1,  1, 2,-1},
211

  
212
       // VTS' algorithm3: swap two 221 blocks
213
        {2, 2,-2,  0, 2,-1,  2, 2, 2,  0, 2, 1,  2, 2,-2,
214
         1, 2,-1,  0, 2,-1,  1, 2, 1,  2, 2,-2,  0, 2,-1,
215
         2, 2, 2,  0, 2, 1,  2, 2,-2,  1, 2,-1,  0, 2, 2,
216
         1, 2, 1 },
217

  
218
       // algorithm3 rotated around the corner
219
        {0, 0,-2,  1, 0, 1,  0, 0,-2,  1, 0,-1,  0, 0, 2,
220
         2, 2,-1,  1, 1, 1,  2, 2, 1,  0, 0, 2,  1, 0, 1,
221
         0, 0,-2,  1, 0,-1,  0, 0, 2,  2, 2,-1,  1, 1,-2,
222
         2, 2, 1 },
223

  
224
       // algorithm3 rotated again around the corner
225
        {1, 2, 2,  2, 0, 1,  1, 2, 2,  2, 0,-1,  1, 2,-2,
226
         0, 0, 1,  2, 1, 1,  0, 0,-1,  1, 2,-2,  2, 0, 1,
227
         1, 2, 2,  2, 0,-1,  1, 2,-2,  0, 0, 1,  2, 1,-2,
228
         0, 0,-1 }
229
      };
146 230
    }
147 231

  
148 232
///////////////////////////////////////////////////////////////////////////////////////////////////
......
156 240
      if( mDimsIndices==null ) mDimsIndices = new int[]
157 241
                                   { 0,
158 242
                                     1,0,2,0,3,0,
159
                                     3,0,4,2,1,0,5,3,6,2,1,0,
243
                                     3,0,7,2,1,0,7,3,7,2,1,0,
160 244
                                     6,2,1,0,5,4,3 };
161 245
      }
162 246

  

Also available in: Unified diff