Project

General

Profile

« Previous | Next » 

Revision 84224c99

Added by Leszek Koltunski about 3 years ago

IAP, part 1: Introduce the concept of a 'free' and 'not free' object to

- ObjectType
- DownloadedObject
- RubikObject
- jsons

View differences:

src/main/java/org/distorted/objectlib/json/JsonReader.java
66 66
  private int[] mNumLayers;
67 67
  private float mSize;
68 68
  private int mScrambleType, mNumScrambles;
69
  private boolean mIsFree;
69 70
  private int[] mColor;
70 71
  private int mInternalColor;
71 72
  private boolean mResetMaps;
......
105 106
    mNumScrambles    = object.getInt("scrambles");
106 107
    mResetMaps       = object.getBoolean("resetmaps");
107 108
    mNumFaces        = object.getInt("num_faces");
109
    mIsFree          = true;
108 110

  
109 111
    try
110 112
      {
......
133 135
    mNumScrambles    = object.getInt("scrambles");
134 136
    mResetMaps       = object.getBoolean("resetmaps");
135 137
    mNumFaces        = object.getInt("num_faces");
138
    mIsFree          = true;
136 139

  
137 140
    try
138 141
      {
......
188 191
      long signature = object.getLong("signature");
189 192
      mSignature = new ObjectSignature(signature);
190 193
      }
194

  
195
    try
196
      {
197
      mIsFree = object.getBoolean("free");
198
      }
199
    catch(JSONException ex)
200
      {
201
      mIsFree = true;
202
      }
191 203
    }
192 204

  
193 205
///////////////////////////////////////////////////////////////////////////////////////////////////
......
835 847

  
836 848
///////////////////////////////////////////////////////////////////////////////////////////////////
837 849

  
838
  public int readNumScrambles(Context context, String fileName) throws IOException, JSONException
850
  public void readNumScramblesAndIsFree(Context context, String fileName) throws IOException, JSONException
839 851
    {
840 852
    File file = new File(context.getFilesDir(), fileName);
841 853
    InputStream stream = new FileInputStream(file);
......
849 861

  
850 862
    JSONObject object = new JSONObject(contents.toString());
851 863
    JSONObject metadata = object.getJSONObject("metadata");
852
    return metadata.getInt("scrambles");
864
    mNumScrambles = metadata.getInt("scrambles");
865
    mIsFree       = metadata.getBoolean("free");
853 866
    }
854 867

  
855 868
///////////////////////////////////////////////////////////////////////////////////////////////////
......
1046 1059
    return mNumScrambles;
1047 1060
    }
1048 1061

  
1062
///////////////////////////////////////////////////////////////////////////////////////////////////
1063

  
1064
  public boolean isFree()
1065
    {
1066
    return mIsFree;
1067
    }
1068

  
1049 1069
///////////////////////////////////////////////////////////////////////////////////////////////////
1050 1070

  
1051 1071
  public ObjectSticker retSticker(int sticker)
src/main/java/org/distorted/objectlib/json/JsonWriter.java
385 385

  
386 386
///////////////////////////////////////////////////////////////////////////////////////////////////
387 387

  
388
  private JSONObject generateMetadata(TwistyObject object, int numScramble) throws JSONException
388
  private JSONObject generateMetadata(TwistyObject object, int numScramble, boolean isFree) throws JSONException
389 389
    {
390 390
    JSONObject metadata = new JSONObject();
391 391

  
......
398 398
    metadata.put("shortname"  , object.getShortName() );
399 399
    metadata.put("resetmaps"  , object.shouldResetTextureMaps() );
400 400
    metadata.put("num_faces"  , object.getNumFaces() );
401
    metadata.put("free"       , isFree );
401 402

  
402 403
    JSONArray sigArray = new JSONArray();
403 404
    long[] sig = object.getSignature().getArray();
......
589 590

  
590 591
///////////////////////////////////////////////////////////////////////////////////////////////////
591 592

  
592
  public String createObjectString(TwistyObject object,int numScramble) throws JSONException
593
  public String createObjectString(TwistyObject object,int numScramble, boolean isFree) throws JSONException
593 594
    {
594 595
    JSONObject json = new JSONObject();
595 596

  
596
    JSONObject metadata    = generateMetadata(object,numScramble);
597
    JSONObject metadata    = generateMetadata(object,numScramble,isFree);
597 598
    JSONObject mesh        = generateMesh(object);
598 599
    JSONArray  axis        = generateAxis(object);
599 600
    JSONArray  quats       = generateQuats(object);
src/main/java/org/distorted/objectlib/main/ObjectType.java
23 23

  
24 24
public enum ObjectType
25 25
  {
26
  CUBE_2 ( TwistyCuboid.class        , 12, R.drawable.cube_2, true, new InitData(new int[] {2,2,2})),
27
  CUBE_3 ( TwistyCuboid.class        , 17, R.drawable.cube_3, true, new InitData(new int[] {3,3,3})),
28
  CUBE_4 ( TwistyCuboid.class        , 24, R.drawable.cube_4, true, new InitData(new int[] {4,4,4})),
29
  CUBE_5 ( TwistyCuboid.class        , 28, R.drawable.cube_5, true, new InitData(new int[] {5,5,5})),
30
  CUBE_6 ( TwistyCuboid.class        , 35, R.drawable.cube_6, true, new InitData(new int[] {6,6,6})),
31

  
32
  CUBE_7 ( TwistyCuboid.class        , 42, R.drawable.cube_7, true, new InitData(new int[] {7,7,7})),
33
  BAN1_3 ( TwistyBandagedCuboid.class, 16, R.drawable.ban1_3, true, new InitData(new int[] {3,3,3}, TwistyBandagedCuboid.POS_1)),
34
  BAN2_3 ( TwistyBandagedCuboid.class, 20, R.drawable.ban2_3, true, new InitData(new int[] {3,3,3}, TwistyBandagedCuboid.POS_2)),
35
  BAN3_3 ( TwistyBandagedCuboid.class, 16, R.drawable.ban3_3, true, new InitData(new int[] {3,3,3}, TwistyBandagedCuboid.POS_3)),
36
  BAN4_3 ( TwistyBandagedCuboid.class, 22, R.drawable.ban4_3, true, new InitData(new int[] {3,3,3}, TwistyBandagedCuboid.POS_4)),
37

  
38
  CU_323 ( TwistyCuboid.class        , 15, R.drawable.cu_323, true, new InitData(new int[] {3,2,3})),
39
  CU_232 ( TwistyCuboid.class        , 16, R.drawable.cu_232, true, new InitData(new int[] {2,3,2})),
40
  CU_343 ( TwistyCuboid.class        , 23, R.drawable.cu_343, true, new InitData(new int[] {3,4,3})),
41
  SQU1_3 ( TwistySquare1.class       , 24, R.drawable.squ1_3, true, new InitData(new int[] {3,2,3})),
42
  SQU2_3 ( TwistySquare2.class       , 24, R.drawable.squ2_3, true, new InitData(new int[] {3,2,3})),
43

  
44
  MORP_2 ( TwistyMorphix.class       , 12, R.drawable.morp_2, true, new InitData(new int[] {2,2,2})),
45
  JING_2 ( TwistyJing.class          , 11, R.drawable.jing_2, true, new InitData(new int[] {2,2,2,2})),
46
  PYRA_3 ( TwistyPyraminx.class      , 10, R.drawable.pyra_3, true, new InitData(new int[] {3,3,3,3})),
47
  PYRA_4 ( TwistyPyraminx.class      , 17, R.drawable.pyra_4, true, new InitData(new int[] {4,4,4,4})),
48
  PYRA_5 ( TwistyPyraminx.class      , 23, R.drawable.pyra_5, true, new InitData(new int[] {5,5,5,5})),
49

  
50
  TRAJ_3 ( TwistyTrajber.class       , 17, R.drawable.traj_3, true, new InitData(new int[] {3,3,3})),
51
  TRAJ_4 ( TwistyTrajber.class       , 24, R.drawable.traj_4, true, new InitData(new int[] {4,4,4})),
52
  DIAM_2 ( TwistyDiamond.class       , 12, R.drawable.diam_2, true, new InitData(new int[] {2,2,2,2})),
53
  DIAM_3 ( TwistyDiamond.class       , 24, R.drawable.diam_3, true, new InitData(new int[] {3,3,3,3})),
54
  DIAM_4 ( TwistyDiamond.class       , 32, R.drawable.diam_4, true, new InitData(new int[] {4,4,4,4})),
55

  
56
  ULTI_2 ( TwistyUltimate.class      , 18, R.drawable.ulti_2, true, new InitData(new int[] {2,2,2,2})),
57
  KILO_3 ( TwistyKilominx.class      , 18, R.drawable.kilo_3, true, new InitData(new int[] {3,3,3,3,3,3})),
58
  MEGA_3 ( TwistyMegaminx.class      , 21, R.drawable.mega_3, true, new InitData(new int[] {3,3,3,3,3,3})),
59
  KILO_5 ( TwistyKilominx.class      , 33, R.drawable.kilo_5, true, new InitData(new int[] {5,5,5,5,5,5})),
60
  MEGA_5 ( TwistyMegaminx.class      , 37, R.drawable.mega_5, true, new InitData(new int[] {5,5,5,5,5,5})),
61

  
62
  CRYS_3 ( TwistyCrystal.class       , 27, R.drawable.crys_3, true, new InitData(new int[] {3,3,3,3,3,3})),
63
  STAR_3 ( TwistyStarminx.class      , 27, R.drawable.star_3, true, new InitData(new int[] {3,3,3,3,3,3})),
64
  PENT_2 ( TwistyPentultimate.class  , 21, R.drawable.pent_2, true, new InitData(new int[] {2,2,2,2,2,2})),
65
  DINO_3 ( TwistyDino6.class         , 10, R.drawable.dino_3, true, new InitData(new int[] {3,3,3,3})),
66
  DIN4_3 ( TwistyDino4.class         ,  9, R.drawable.din4_3, true, new InitData(new int[] {3,3,3,3})),
67

  
68
  MIRR_2 ( TwistyMirror.class        , 12, R.drawable.mirr_2, true, new InitData(new int[] {2,2,2})),
69
  MIRR_3 ( TwistyMirror.class        , 17, R.drawable.mirr_3, true, new InitData(new int[] {3,3,3})),
70
  MIRR_4 ( TwistyMirror.class        , 24, R.drawable.mirr_4, true, new InitData(new int[] {4,4,4})),
71
  IVY_2  ( TwistyIvy.class           ,  9, R.drawable.ivy_2 , true, new InitData(new int[] {2,2,2,2})),
72
  REX_3  ( TwistyRex.class           , 19, R.drawable.rex_3 , true, new InitData(new int[] {3,3,3,3})),
73

  
74
  REDI_3 ( TwistyRedi.class          , 16, R.drawable.redi_3, true, new InitData(new int[] {3,3,3,3})),
75
  HELI_3 ( TwistyHelicopter.class    , 20, R.drawable.heli_3, true, new InitData(new int[] {3,3,3,3,3,3})),
76
  SKEW_2 ( TwistySkewb.class         , 11, R.drawable.skew_2, true, new InitData(new int[] {2,2,2,2})),
77
  SKEW_3 ( TwistySkewb.class         , 21, R.drawable.skew_3, true, new InitData(new int[] {3,3,3,3})),
78
  CONT_2 ( TwistyContainer.class     , 12, R.drawable.cont_2, true, new InitData(new int[] {2,2,2,2})),
79

  
80
  FISH_3 ( TwistyFisher.class        , 24, R.drawable.fish_3, true, new InitData(new int[] {3,3,3})),
81
  WIND_3 ( TwistyWindmill.class      , 24, R.drawable.wind_3, true, new InitData(new int[] {3,3,3})),
82
  AXIS_3 ( TwistyAxis.class          , 24, R.drawable.axis_3, true, new InitData(new int[] {3,3,3})),
83
  VOID_3 ( TwistyVoid.class          , 17, R.drawable.void_3, true, new InitData(new int[] {3,3,3})),
84
  MIXU_3 ( TwistyMixup3x3.class      , 24, R.drawable.mixu_3, true, new InitData(new int[] {3,3,3})),
85

  
86
  MIXP_3 ( TwistyMixup3x3Plus.class  , 28, R.drawable.mixp_3, true, new InitData(new int[] {3,3,3})),
87
  CRA1_2 ( TwistyCrazy2x2.class      , 16, R.drawable.cra1_2, false, new InitData(new int[] {2,2,2})),
88
  CRA1_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra1_3, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.CRAZY  )),
89
  CRA2_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra2_3, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.MERCURY)),
90
  CRA3_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra3_3, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.VENUS  )),
91
  CRA4_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra4_3, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.EARTH  )),
92
  CRA5_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra5_3, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.MARS   )),
93
  CRA6_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra6_3, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.JUPITER)),
94
  CRA7_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra7_3, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.SATURN )),
95
  CRA8_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra8_3, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.URANUS )),
96
  CRA9_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra9_3, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.NEPTUNE)),
26
  CUBE_2 ( TwistyCuboid.class        , 12, R.drawable.cube_2, true, true,  new InitData(new int[] {2,2,2})),
27
  CUBE_3 ( TwistyCuboid.class        , 17, R.drawable.cube_3, true, true,  new InitData(new int[] {3,3,3})),
28
  CUBE_4 ( TwistyCuboid.class        , 24, R.drawable.cube_4, true, false, new InitData(new int[] {4,4,4})),
29
  CUBE_5 ( TwistyCuboid.class        , 28, R.drawable.cube_5, true, false, new InitData(new int[] {5,5,5})),
30
  CUBE_6 ( TwistyCuboid.class        , 35, R.drawable.cube_6, true, false, new InitData(new int[] {6,6,6})),
31

  
32
  CUBE_7 ( TwistyCuboid.class        , 42, R.drawable.cube_7, true, false, new InitData(new int[] {7,7,7})),
33
  BAN1_3 ( TwistyBandagedCuboid.class, 16, R.drawable.ban1_3, true, true,  new InitData(new int[] {3,3,3}, TwistyBandagedCuboid.POS_1)),
34
  BAN2_3 ( TwistyBandagedCuboid.class, 20, R.drawable.ban2_3, true, false, new InitData(new int[] {3,3,3}, TwistyBandagedCuboid.POS_2)),
35
  BAN3_3 ( TwistyBandagedCuboid.class, 16, R.drawable.ban3_3, true, false, new InitData(new int[] {3,3,3}, TwistyBandagedCuboid.POS_3)),
36
  BAN4_3 ( TwistyBandagedCuboid.class, 22, R.drawable.ban4_3, true, false, new InitData(new int[] {3,3,3}, TwistyBandagedCuboid.POS_4)),
37

  
38
  CU_323 ( TwistyCuboid.class        , 15, R.drawable.cu_323, true, false, new InitData(new int[] {3,2,3})),
39
  CU_232 ( TwistyCuboid.class        , 16, R.drawable.cu_232, true, true,  new InitData(new int[] {2,3,2})),
40
  CU_343 ( TwistyCuboid.class        , 23, R.drawable.cu_343, true, false, new InitData(new int[] {3,4,3})),
41
  SQU1_3 ( TwistySquare1.class       , 24, R.drawable.squ1_3, true, false, new InitData(new int[] {3,2,3})),
42
  SQU2_3 ( TwistySquare2.class       , 24, R.drawable.squ2_3, true, false, new InitData(new int[] {3,2,3})),
43

  
44
  MORP_2 ( TwistyMorphix.class       , 12, R.drawable.morp_2, true, true,  new InitData(new int[] {2,2,2})),
45
  JING_2 ( TwistyJing.class          , 11, R.drawable.jing_2, true, false, new InitData(new int[] {2,2,2,2})),
46
  PYRA_3 ( TwistyPyraminx.class      , 10, R.drawable.pyra_3, true, true,  new InitData(new int[] {3,3,3,3})),
47
  PYRA_4 ( TwistyPyraminx.class      , 17, R.drawable.pyra_4, true, false, new InitData(new int[] {4,4,4,4})),
48
  PYRA_5 ( TwistyPyraminx.class      , 23, R.drawable.pyra_5, true, false, new InitData(new int[] {5,5,5,5})),
49

  
50
  TRAJ_3 ( TwistyTrajber.class       , 17, R.drawable.traj_3, true, false, new InitData(new int[] {3,3,3})),
51
  TRAJ_4 ( TwistyTrajber.class       , 24, R.drawable.traj_4, true, false, new InitData(new int[] {4,4,4})),
52
  DIAM_2 ( TwistyDiamond.class       , 12, R.drawable.diam_2, true, true,  new InitData(new int[] {2,2,2,2})),
53
  DIAM_3 ( TwistyDiamond.class       , 24, R.drawable.diam_3, true, false, new InitData(new int[] {3,3,3,3})),
54
  DIAM_4 ( TwistyDiamond.class       , 32, R.drawable.diam_4, true, false, new InitData(new int[] {4,4,4,4})),
55

  
56
  ULTI_2 ( TwistyUltimate.class      , 18, R.drawable.ulti_2, true, false, new InitData(new int[] {2,2,2,2})),
57
  KILO_3 ( TwistyKilominx.class      , 18, R.drawable.kilo_3, true, false, new InitData(new int[] {3,3,3,3,3,3})),
58
  MEGA_3 ( TwistyMegaminx.class      , 21, R.drawable.mega_3, true, true,  new InitData(new int[] {3,3,3,3,3,3})),
59
  KILO_5 ( TwistyKilominx.class      , 33, R.drawable.kilo_5, true, false, new InitData(new int[] {5,5,5,5,5,5})),
60
  MEGA_5 ( TwistyMegaminx.class      , 37, R.drawable.mega_5, true, false, new InitData(new int[] {5,5,5,5,5,5})),
61

  
62
  CRYS_3 ( TwistyCrystal.class       , 27, R.drawable.crys_3, true, false, new InitData(new int[] {3,3,3,3,3,3})),
63
  STAR_3 ( TwistyStarminx.class      , 27, R.drawable.star_3, true, false, new InitData(new int[] {3,3,3,3,3,3})),
64
  PENT_2 ( TwistyPentultimate.class  , 21, R.drawable.pent_2, true, false, new InitData(new int[] {2,2,2,2,2,2})),
65
  DINO_3 ( TwistyDino6.class         , 10, R.drawable.dino_3, true, true , new InitData(new int[] {3,3,3,3})),
66
  DIN4_3 ( TwistyDino4.class         ,  9, R.drawable.din4_3, true, false, new InitData(new int[] {3,3,3,3})),
67

  
68
  MIRR_2 ( TwistyMirror.class        , 12, R.drawable.mirr_2, true, true,  new InitData(new int[] {2,2,2})),
69
  MIRR_3 ( TwistyMirror.class        , 17, R.drawable.mirr_3, true, false, new InitData(new int[] {3,3,3})),
70
  MIRR_4 ( TwistyMirror.class        , 24, R.drawable.mirr_4, true, false, new InitData(new int[] {4,4,4})),
71
  IVY_2  ( TwistyIvy.class           ,  9, R.drawable.ivy_2 , true, true,  new InitData(new int[] {2,2,2,2})),
72
  REX_3  ( TwistyRex.class           , 19, R.drawable.rex_3 , true, false, new InitData(new int[] {3,3,3,3})),
73

  
74
  REDI_3 ( TwistyRedi.class          , 16, R.drawable.redi_3, true, true,  new InitData(new int[] {3,3,3,3})),
75
  HELI_3 ( TwistyHelicopter.class    , 20, R.drawable.heli_3, true, false, new InitData(new int[] {3,3,3,3,3,3})),
76
  SKEW_2 ( TwistySkewb.class         , 11, R.drawable.skew_2, true, true,  new InitData(new int[] {2,2,2,2})),
77
  SKEW_3 ( TwistySkewb.class         , 21, R.drawable.skew_3, true, false, new InitData(new int[] {3,3,3,3})),
78
  CONT_2 ( TwistyContainer.class     , 12, R.drawable.cont_2, true, false, new InitData(new int[] {2,2,2,2})),
79

  
80
  FISH_3 ( TwistyFisher.class        , 24, R.drawable.fish_3, true, false, new InitData(new int[] {3,3,3})),
81
  WIND_3 ( TwistyWindmill.class      , 24, R.drawable.wind_3, true, false, new InitData(new int[] {3,3,3})),
82
  AXIS_3 ( TwistyAxis.class          , 24, R.drawable.axis_3, true, false, new InitData(new int[] {3,3,3})),
83
  VOID_3 ( TwistyVoid.class          , 17, R.drawable.void_3, true, false, new InitData(new int[] {3,3,3})),
84
  MIXU_3 ( TwistyMixup3x3.class      , 24, R.drawable.mixu_3, true, false, new InitData(new int[] {3,3,3})),
85

  
86
  MIXP_3 ( TwistyMixup3x3Plus.class  , 28, R.drawable.mixp_3, true , false, new InitData(new int[] {3,3,3})),
87
  CRA1_2 ( TwistyCrazy2x2.class      , 16, R.drawable.cra1_2, false, false, new InitData(new int[] {2,2,2})),
88
  CRA1_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra1_3, false, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.CRAZY  )),
89
  CRA2_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra2_3, false, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.MERCURY)),
90
  CRA3_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra3_3, false, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.VENUS  )),
91
  CRA4_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra4_3, false, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.EARTH  )),
92
  CRA5_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra5_3, false, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.MARS   )),
93
  CRA6_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra6_3, false, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.JUPITER)),
94
  CRA7_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra7_3, false, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.SATURN )),
95
  CRA8_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra8_3, false, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.URANUS )),
96
  CRA9_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra9_3, false, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.NEPTUNE)),
97 97
  ;
98 98

  
99 99
  public static int NUM_OBJECTS;
......
105 105
  private final int mNumScrambles;
106 106
  private final int mIcon;
107 107
  private final boolean mExportToApp;
108
  private final boolean mIsFree;
108 109
  private final Class<? extends TwistyObject> mClass;
109 110

  
110 111
  static
......
119 120

  
120 121
///////////////////////////////////////////////////////////////////////////////////////////////////
121 122

  
122
  ObjectType(Class<? extends TwistyObject> clazz, int scrambles, int icon, boolean export, InitData data)
123
  ObjectType(Class<? extends TwistyObject> clazz, int scrambles, int icon, boolean export, boolean isFree, InitData data)
123 124
    {
124
    mClass              = clazz;
125
    mInitData           = data;
126
    mNumScrambles       = scrambles;
127
    mIcon               = icon;
128
    mExportToApp        = export;
125
    mClass       = clazz;
126
    mInitData    = data;
127
    mNumScrambles= scrambles;
128
    mIcon        = icon;
129
    mExportToApp = export;
130
    mIsFree      = isFree;
129 131
    }
130 132

  
131 133
///////////////////////////////////////////////////////////////////////////////////////////////////
......
162 164
    return mNumScrambles;
163 165
    }
164 166

  
167
///////////////////////////////////////////////////////////////////////////////////////////////////
168

  
169
  public boolean isFree()
170
    {
171
    return mIsFree;
172
    }
173

  
165 174
///////////////////////////////////////////////////////////////////////////////////////////////////
166 175

  
167 176
  public static TwistyObject create(int ordinal, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream meshStream)

Also available in: Unified diff