Project

General

Profile

« Previous | Next » 

Revision 2067efd8

Added by Leszek Koltunski over 3 years ago

Fully support the 4-color Dino.

View differences:

src/main/java/org/distorted/objects/RubikDino4.java
25 25
import org.distorted.library.main.DistortedTexture;
26 26
import org.distorted.library.mesh.MeshSquare;
27 27
import org.distorted.library.type.Static4D;
28
import org.distorted.main.RubikSurfaceView;
28

  
29
import java.util.Random;
30

  
31
import static org.distorted.effects.scramble.ScrambleEffect.START_AXIS;
29 32

  
30 33
///////////////////////////////////////////////////////////////////////////////////////////////////
31 34

  
......
62 65
    return true;
63 66
    }
64 67

  
68
///////////////////////////////////////////////////////////////////////////////////////////////////
69

  
70
  public int randomizeNewRow(Random rnd, int oldRotAxis, int oldRow, int newRotAxis)
71
    {
72
    return (oldRotAxis==START_AXIS) ? ((newRotAxis==1 || newRotAxis==2) ? 0:2) : (oldRotAxis+newRotAxis==3 ? 2-oldRow : oldRow);
73
    }
74

  
65 75
///////////////////////////////////////////////////////////////////////////////////////////////////
66 76
// Dino4 is solved if and only if the four groups of three same-colored cubits each are rotate with
67 77
// the same quaternion (actually we need to check only 3 first groups - if those are correct, the

Also available in: Unified diff