Project

General

Profile

« Previous | Next » 

Revision bdbbb4c5

Added by Leszek Koltunski over 2 years ago

Refactoring: split the 'objects' package into two, 'objects' and 'objectlib'.
The point: we're going to need to move the 'objectlib' stuff into its own library module, and that's because we're going to create a new app module which needs access to it.

View differences:

src/main/java/org/distorted/objects/TwistySkewb.java
19 19

  
20 20
package org.distorted.objects;
21 21

  
22
import static org.distorted.objects.Movement.TYPE_SPLIT_CORNER;
22
import static org.distorted.objectlb.Movement.TYPE_SPLIT_CORNER;
23 23

  
24 24
import android.content.res.Resources;
25 25

  
26
import org.distorted.helpers.ObjectShape;
27
import org.distorted.helpers.ObjectSticker;
28
import org.distorted.helpers.ScrambleState;
26
import org.distorted.objectlb.ObjectShape;
27
import org.distorted.objectlb.ObjectSticker;
28
import org.distorted.objectlb.ScrambleState;
29 29
import org.distorted.library.main.DistortedEffects;
30 30
import org.distorted.library.main.DistortedTexture;
31 31
import org.distorted.library.mesh.MeshSquare;
32 32
import org.distorted.library.type.Static3D;
33 33
import org.distorted.library.type.Static4D;
34 34
import org.distorted.main.R;
35
import org.distorted.objectlb.Movement;
36
import org.distorted.objectlb.Movement6;
37
import org.distorted.objectlb.ObjectList;
38
import org.distorted.objectlb.Twisty6;
35 39

  
36 40
///////////////////////////////////////////////////////////////////////////////////////////////////
37 41

  
......
66 70

  
67 71
///////////////////////////////////////////////////////////////////////////////////////////////////
68 72

  
69
  TwistySkewb(int size, Static4D quat, DistortedTexture texture,
70
              MeshSquare mesh, DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
73
  public TwistySkewb(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
74
                     DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
71 75
    {
72 76
    super(size, 2*size-2, quat, texture, mesh, effects, moves, ObjectList.SKEW, res, scrWidth);
73 77
    }
74 78

  
75 79
///////////////////////////////////////////////////////////////////////////////////////////////////
76 80

  
77
  ScrambleState[] getScrambleStates()
81
  protected ScrambleState[] getScrambleStates()
78 82
    {
79 83
    if( mStates==null )
80 84
      {
......
114 118

  
115 119
///////////////////////////////////////////////////////////////////////////////////////////////////
116 120

  
117
  int[] getSolvedQuats(int cubit, int numLayers)
121
  protected int[] getSolvedQuats(int cubit, int numLayers)
118 122
    {
119 123
    if( mQuats==null ) initializeQuats();
120 124
    int status = retCubitSolvedStatus(cubit,numLayers);
......
144 148

  
145 149
///////////////////////////////////////////////////////////////////////////////////////////////////
146 150

  
147
  Static4D[] getQuats()
151
  protected Static4D[] getQuats()
148 152
    {
149 153
    if( mQuats==null ) initializeQuats();
150 154
    return mQuats;
......
152 156

  
153 157
///////////////////////////////////////////////////////////////////////////////////////////////////
154 158

  
155
  int getSolvedFunctionIndex()
159
  protected int getSolvedFunctionIndex()
156 160
    {
157 161
    return 0;
158 162
    }
159 163

  
160 164
///////////////////////////////////////////////////////////////////////////////////////////////////
161 165

  
162
  int getNumStickerTypes(int numLayers)
166
  protected int getNumStickerTypes(int numLayers)
163 167
    {
164 168
    return 3;
165 169
    }
166 170

  
167 171
///////////////////////////////////////////////////////////////////////////////////////////////////
168 172

  
169
  float[][] getCuts(int numLayers)
173
  protected float[][] getCuts(int numLayers)
170 174
    {
171 175
    if( mCuts==null )
172 176
      {
......
192 196

  
193 197
///////////////////////////////////////////////////////////////////////////////////////////////////
194 198

  
195
  int getNumCubitFaces()
199
  protected int getNumCubitFaces()
196 200
    {
197 201
    return 6;
198 202
    }
199 203

  
200 204
///////////////////////////////////////////////////////////////////////////////////////////////////
201 205

  
202
  float[][] getCubitPositions(int numLayers)
206
  protected float[][] getCubitPositions(int numLayers)
203 207
    {
204 208
    final float DIST_CORNER = numLayers-1;
205 209
    final float DIST_EDGE   = numLayers-1;
......
327 331

  
328 332
///////////////////////////////////////////////////////////////////////////////////////////////////
329 333

  
330
  Static4D getQuat(int cubit, int numLayers)
334
  protected Static4D getQuat(int cubit, int numLayers)
331 335
    {
332 336
    if( mQuats==null ) initializeQuats();
333 337
    int numCorners = getNumCorners();
......
387 391

  
388 392
///////////////////////////////////////////////////////////////////////////////////////////////////
389 393

  
390
  ObjectShape getObjectShape(int cubit, int numLayers)
394
  protected ObjectShape getObjectShape(int cubit, int numLayers)
391 395
    {
392 396
    int variant = getCubitVariant(cubit,numLayers);
393 397

  
......
438 442

  
439 443
///////////////////////////////////////////////////////////////////////////////////////////////////
440 444

  
441
  int getNumCubitVariants(int numLayers)
445
  protected int getNumCubitVariants(int numLayers)
442 446
    {
443 447
    return 3;
444 448
    }
445 449

  
446 450
///////////////////////////////////////////////////////////////////////////////////////////////////
447 451

  
448
  int getCubitVariant(int cubit, int numLayers)
452
  protected int getCubitVariant(int cubit, int numLayers)
449 453
    {
450 454
    int numCorners = getNumCorners();
451 455
    if( cubit<numCorners ) return 0;
......
455 459

  
456 460
///////////////////////////////////////////////////////////////////////////////////////////////////
457 461

  
458
  int getFaceColor(int cubit, int cubitface, int numLayers)
462
  protected int getFaceColor(int cubit, int cubitface, int numLayers)
459 463
    {
460 464
    if( mCornerMap==null || mEdgeMap==null || mCenterMap==null )
461 465
      {
......
519 523

  
520 524
///////////////////////////////////////////////////////////////////////////////////////////////////
521 525

  
522
  ObjectSticker retSticker(int face)
526
  protected ObjectSticker retSticker(int face)
523 527
    {
524 528
    if( mStickers==null )
525 529
      {

Also available in: Unified diff