Project

General

Profile

« Previous | Next » 

Revision e4733ed7

Added by Leszek Koltunski about 2 years ago

New, generic bandaged 3x3 class 'TwistyBandagedAbstract'.

Now, (almost!) any bandaged 3x3 can be created by extending this class and implementing one abstract method 'getPositions()'. Almost, because there's still one restriction: currently all cubits need to be one of the 5 allowed types: 1x1x1, 2x1x1, 3x1x1, 2x2x1, 2x2x2.

Still, two missing 'TODOs' need to be implemented for truly 'any' bandaged cube to be supported.

View differences:

src/main/java/org/distorted/solvers/SolverMain.java
21 21

  
22 22
import android.content.res.Resources;
23 23

  
24
import org.distorted.objectlib.main.ObjectConstants;
24
import org.distorted.objectlib.main.ObjectSignatures;
25 25
import org.distorted.objectlib.main.TwistyObject;
26 26

  
27 27
import org.distorted.main.R;
......
53 53

  
54 54
  public static int cubitIsLocked(int object, int cubit)
55 55
    {
56
    if( object == ObjectConstants.CUBE_3 )
56
    if( object == ObjectSignatures.CUBE_3 )
57 57
      {
58 58
      if( cubit==20 ) return 0; // center of the right  face
59 59
      if( cubit==21 ) return 1; // center of the left   face
......
228 228
    {
229 229
    RubikScreenSolver solver = (RubikScreenSolver) ScreenList.SVER.getScreenClass();
230 230

  
231
    if( mSignature==ObjectConstants.CUBE_3 )
231
    if( mSignature== ObjectSignatures.CUBE_3 )
232 232
      {
233 233
      solveCube3(solver);
234 234
      }

Also available in: Unified diff