Project

General

Profile

« Previous | Next » 

Revision 91792184

Added by Leszek Koltunski over 2 years ago

Make object scrambling abstract (well, almost - with exception of Square-1 - this theoretically could also be done the generic way, but this would require almost 20000 'ScrambleStates')

View differences:

src/main/java/org/distorted/objects/TwistyBandaged2Bar.java
36 36
                     DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
37 37
    {
38 38
    super(size, quat, texture, mesh, effects, moves, ObjectList.BAN2, res, scrWidth);
39
    }
40

  
41
///////////////////////////////////////////////////////////////////////////////////////////////////
39 42

  
40
    mStates = new ScrambleState[]
43
  ScrambleState[] getScrambleStates()
44
    {
45
    if( mStates==null )
41 46
      {
42
      new ScrambleState( new int[][] { {}                                          , {0,1,1, 0,-1,1, 2,1,2, 2,-1,2}, {} }),
43
      new ScrambleState( new int[][] { {0,-1,1, 0,1,1, 0,2,1, 2,-1,1, 2,1,1, 2,2,1}, {0,2,1, 2,2,1}                , {} }),
44
      new ScrambleState( new int[][] { {}, {0,2,2, 2,2,2}                , {0,-1,2, 0,1,2, 0,2,2, 2,-1,2, 2,1,2, 2,2,2} })
45
      };
47
      mStates = new ScrambleState[]
48
        {
49
        new ScrambleState( new int[][] { {}                                          , {0,1,1, 0,-1,1, 2,1,2, 2,-1,2}, {} }),
50
        new ScrambleState( new int[][] { {0,-1,1, 0,1,1, 0,2,1, 2,-1,1, 2,1,1, 2,2,1}, {0,2,1, 2,2,1}                , {} }),
51
        new ScrambleState( new int[][] { {}, {0,2,2, 2,2,2}                , {0,-1,2, 0,1,2, 0,2,2, 2,-1,2, 2,1,2, 2,2,2} })
52
        };
53
      }
54

  
55
    return mStates;
46 56
    }
47 57

  
48 58
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff