Project

General

Profile

« Previous | Next » 

Revision be7c9190

Added by Leszek Koltunski over 2 years ago

Abstract out some methods from the Movement classes. only two remain now: rowFromOffset and enabledAxis.

View differences:

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

  
20 20
package org.distorted.objects;
21 21

  
22
import org.distorted.library.type.Static3D;
23

  
24 22
///////////////////////////////////////////////////////////////////////////////////////////////////
25 23

  
26
class MovementSquare extends Movement
24
class MovementSquare extends Movement6
27 25
{
28
  static final float DIST3D = 0.5f;
29
  static final float DIST2D = 0.5f;
30

  
31
  static final Static3D[] FACE_AXIS = new Static3D[]
32
         {
33
           new Static3D(1,0,0), new Static3D(-1,0,0),
34
           new Static3D(0,1,0), new Static3D(0,-1,0),
35
           new Static3D(0,0,1), new Static3D(0,0,-1)
36
         };
37

  
38
///////////////////////////////////////////////////////////////////////////////////////////////////
39

  
40 26
  MovementSquare()
41 27
    {
42
    super(TwistySquare.ROT_AXIS, FACE_AXIS, DIST3D, DIST2D);
28
    super(TwistySquare.ROT_AXIS);
43 29
    }
44 30

  
45 31
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff