Project

General

Profile

« Previous | Next » 

Revision d379f92d

Added by Leszek Koltunski over 3 years ago

solve the 'wasDownloadableButNowIsBuiltIn()' bug in 1.9.6 and 1.9.7.

View differences:

src/main/java/org/distorted/objectlib/main/ObjectType.java
72 72
  REX_3  ( TwistyRex.class           , new int[] {3,3,3,3}    , 19, R.drawable.rex_3 , true),
73 73
  MIRR_2 ( TwistyMirror.class        , new int[] {2,2,2}      , 12, R.drawable.mirr_2, true),
74 74
  MIRR_3 ( TwistyMirror.class        , new int[] {3,3,3}      , 17, R.drawable.mirr_3, true),
75
  MIRR_4 ( TwistyMirror.class        , new int[] {4,4,4}      , 24, R.drawable.mirr_4, false),
76
  FISH_3 ( TwistyFisher.class        , new int[] {3,3,3}      , 24, R.drawable.fish_3, false),
77
  CONT_2 ( TwistyContainer.class     , new int[] {2,2,2,2}    , 12, R.drawable.cont_2, false),
78
  MORP_2 ( TwistyMorphix.class       , new int[] {2,2,2}      , 12, R.drawable.morp_2, false),
75
  MIRR_4 ( TwistyMirror.class        , new int[] {4,4,4}      , 24, R.drawable.mirr_4, false),  // first 'downloadable' object:" MIRR_4. Do not re-arrange
76
  FISH_3 ( TwistyFisher.class        , new int[] {3,3,3}      , 24, R.drawable.fish_3, false),  // the order here as to mix the 'pre-MIRR_4' objects with
77
  CONT_2 ( TwistyContainer.class     , new int[] {2,2,2,2}    , 12, R.drawable.cont_2, false),  // the 'post-MIRR_4' ones lest we screw up the
78
  MORP_2 ( TwistyMorphix.class       , new int[] {2,2,2}      , 12, R.drawable.morp_2, false),  // 'wasDownloadableButNowIsBuiltIn()' function.
79 79
  ;
80 80

  
81 81
  public static int NUM_OBJECTS;
......
116 116
    return ordinal>=0 && ordinal<NUM_OBJECTS ? objects[ordinal] : CUBE_3;
117 117
    }
118 118

  
119
///////////////////////////////////////////////////////////////////////////////////////////////////
120
// This is for the getDBLevel() function in RubikObjectList. Two assumptions:
121
//
122
// a) all objects past the first 'downloadable' one - the MIRR_4 - will be downloadable as well
123
// b) there will be no re-arranging which would mix the 'pre-MIRR_4' and the 'post-MIRR_4' objects.
124

  
125
  public static boolean wasDownloadableButNowIsBuiltIn(int ordinal)
126
    {
127
    return ordinal>=ObjectType.MIRR_4.ordinal() && ordinal<NUM_OBJECTS;
128
    }
129

  
119 130
///////////////////////////////////////////////////////////////////////////////////////////////////
120 131

  
121 132
  public static int getOrdinal(String name)

Also available in: Unified diff