Project

General

Profile

« Previous | Next » 

Revision 15846fe4

Added by Leszek Koltunski almost 4 years ago

cube_back and cube_solve buttons.

View differences:

src/main/java/org/distorted/main/RubikSurfaceView.java
34 34
import org.distorted.objects.RubikObjectMovement;
35 35
import org.distorted.solvers.SolverMain;
36 36
import org.distorted.states.RubikState;
37
import org.distorted.states.RubikStatePlay;
37 38
import org.distorted.states.RubikStateSolver;
38 39
import org.distorted.states.RubikStateSolving;
39 40

  
......
393 394
      int angle = mPreRender.getObject().computeNearestAngle(mCurrentAngle, mCurrRotSpeed);
394 395
      mPreRender.finishRotation(angle);
395 396

  
396
      if( RubikState.getCurrentState()==RubikState.SOLV && angle!=0 )
397
      if( angle!=0 )
397 398
        {
398
        RubikStateSolving solving = (RubikStateSolving)RubikState.SOLV.getStateClass();
399
        solving.addMove(mCurrentAxis, mCurrentRow, angle);
399
        if( RubikState.getCurrentState()==RubikState.SOLV )
400
          {
401
          RubikStateSolving solving = (RubikStateSolving)RubikState.SOLV.getStateClass();
402
          solving.addMove(mCurrentAxis, mCurrentRow, angle);
403
          }
404
        if( RubikState.getCurrentState()==RubikState.PLAY )
405
          {
406
          RubikStatePlay play = (RubikStatePlay)RubikState.PLAY.getStateClass();
407
          play.addMove(mCurrentAxis, mCurrentRow, angle);
408
          }
400 409
        }
401 410

  
402 411
      mContinuingRotation = false;

Also available in: Unified diff