Project

General

Profile

« Previous | Next » 

Revision efa81f0c

Added by Leszek Koltunski over 2 years ago

Introduce abstract 4,6,8 adn 12 classes.

View differences:

src/main/java/org/distorted/objects/TwistyRedi.java
33 33

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

  
36
public class TwistyRedi extends TwistyObject
36
public class TwistyRedi extends Twisty6
37 37
{
38
  // the four rotation axis of a Redi. Must be normalized.
39 38
  static final Static3D[] ROT_AXIS = new Static3D[]
40 39
         {
41 40
           new Static3D(+SQ3/3,+SQ3/3,+SQ3/3),
......
44 43
           new Static3D(+SQ3/3,-SQ3/3,-SQ3/3)
45 44
         };
46 45

  
47
  private static final int[] FACE_COLORS = new int[]
48
         {
49
           COLOR_YELLOW, COLOR_WHITE,
50
           COLOR_BLUE  , COLOR_GREEN,
51
           COLOR_RED   , COLOR_ORANGE
52
         };
53

  
54
  private static final int FACES_PER_CUBIT =9;
55

  
56 46
  private ScrambleState[] mStates;
57 47
  private int[] mBasicAngle;
58 48
  private Static4D[] mQuats;
......
123 113
    return status<0 ? null : buildSolvedQuats(MovementCornerTwisting.FACE_AXIS[status],mQuats);
124 114
    }
125 115

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

  
128
  float getScreenRatio()
129
    {
130
    return 0.50f;
131
    }
132

  
133 116
///////////////////////////////////////////////////////////////////////////////////////////////////
134 117

  
135 118
  Static4D[] getQuats()
......
138 121
    return mQuats;
139 122
    }
140 123

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

  
143
  int getNumFaceColors()
144
    {
145
    return FACE_COLORS.length;
146
    }
147

  
148 124
///////////////////////////////////////////////////////////////////////////////////////////////////
149 125

  
150 126
  int getSolvedFunctionIndex()
......
152 128
    return 0;
153 129
    }
154 130

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

  
157
  boolean shouldResetTextureMaps()
158
    {
159
    return false;
160
    }
161

  
162 131
///////////////////////////////////////////////////////////////////////////////////////////////////
163 132

  
164 133
  int getNumStickerTypes(int numLayers)
......
179 148

  
180 149
  int getNumCubitFaces()
181 150
    {
182
    return FACES_PER_CUBIT;
151
    return 9;
183 152
    }
184 153

  
185 154
///////////////////////////////////////////////////////////////////////////////////////////////////
......
382 351
    return cubitface<3 ? mFaceMap[cubit][cubitface] : NUM_TEXTURES;
383 352
    }
384 353

  
385
///////////////////////////////////////////////////////////////////////////////////////////////////
386

  
387
  int getColor(int face)
388
    {
389
    return FACE_COLORS[face];
390
    }
391

  
392 354
///////////////////////////////////////////////////////////////////////////////////////////////////
393 355

  
394 356
  ObjectSticker retSticker(int face)
......
417 379
    return mStickers[face/NUM_FACE_COLORS];
418 380
    }
419 381

  
420
///////////////////////////////////////////////////////////////////////////////////////////////////
421

  
422
  float returnMultiplier()
423
    {
424
    return 2.0f;
425
    }
426

  
427 382
///////////////////////////////////////////////////////////////////////////////////////////////////
428 383
// PUBLIC API
429 384

  

Also available in: Unified diff