Project

General

Profile

« Previous | Next » 

Revision d433b50e

Added by Leszek Koltunski over 2 years ago

In the 'magic' app, ObjectType is now only used in RubikObject and RubikObjectList classes and nowhere else.
This is a major step towards being able to download objects from an online repository.

View differences:

src/main/java/org/distorted/solvers/SolverMain.java
21 21

  
22 22
import android.content.res.Resources;
23 23

  
24
import org.distorted.objectlib.main.ObjectType;
24
import org.distorted.objectlib.main.ObjectConstants;
25 25
import org.distorted.objectlib.main.TwistyObject;
26 26

  
27 27
import org.distorted.main.R;
......
34 34
{
35 35
  private final Resources mRes;
36 36
  private final TwistyObject mObject;
37
  private final int mOrdinal;
37 38

  
38 39
///////////////////////////////////////////////////////////////////////////////////////////////////
39 40

  
......
41 42
    {
42 43
    mRes   = res;
43 44
    mObject= object;
45
    mOrdinal = object.getObjectType().ordinal();
44 46
    }
45 47

  
46 48
///////////////////////////////////////////////////////////////////////////////////////////////////
......
49 51
// If a certain cubit is locked, return the color (index into it's FACE_COLORS array) it
50 52
// must have. Otherwise return -1.
51 53

  
52
  public static int cubitIsLocked(ObjectType object, int cubit)
54
  public static int cubitIsLocked(int object, int cubit)
53 55
    {
54
    if( object == ObjectType.CUBE_3 )
56
    if( object == ObjectConstants.CUBE_3 )
55 57
      {
56 58
      if( cubit==20 ) return 0; // center of the right  face
57 59
      if( cubit==21 ) return 1; // center of the left   face
......
209 211
    {
210 212
    RubikScreenSolver solver = (RubikScreenSolver) ScreenList.SVER.getScreenClass();
211 213

  
212
    if( mObject!=null && mObject.getObjectType()==ObjectType.CUBE_3 )
214
    if( mOrdinal==ObjectConstants.CUBE_3 )
213 215
      {
214 216
      solveCube3(solver);
215 217
      }

Also available in: Unified diff