Revision be576d14
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/main/RubikSurfaceView.java | ||
---|---|---|
35 | 35 |
import org.distorted.objects.TwistyObject; |
36 | 36 |
import org.distorted.objects.Movement; |
37 | 37 |
import org.distorted.solvers.SolverMain; |
38 |
import org.distorted.states.RubikState;
|
|
38 |
import org.distorted.states.StateList;
|
|
39 | 39 |
import org.distorted.states.RubikStatePlay; |
40 | 40 |
import org.distorted.states.RubikStateSolver; |
41 | 41 |
import org.distorted.states.RubikStateSolving; |
... | ... | |
295 | 295 |
|
296 | 296 |
private void setUpDragOrRotate(boolean down, float x, float y) |
297 | 297 |
{ |
298 |
int mode = RubikState.getMode();
|
|
298 |
int mode = StateList.getMode();
|
|
299 | 299 |
|
300 | 300 |
if( mode==MODE_DRAG ) |
301 | 301 |
{ |
... | ... | |
324 | 324 |
|
325 | 325 |
if( down ) |
326 | 326 |
{ |
327 |
RubikStateSolver solver = (RubikStateSolver) RubikState.SVER.getStateClass();
|
|
327 |
RubikStateSolver solver = (RubikStateSolver) StateList.SVER.getStateClass();
|
|
328 | 328 |
mLastCubitFace = mMovement.getTouchedFace(); |
329 | 329 |
float[] point = mMovement.getTouchedPoint3D(); |
330 | 330 |
int color = solver.getCurrentColor(); |
... | ... | |
413 | 413 |
|
414 | 414 |
if( angle!=0 ) |
415 | 415 |
{ |
416 |
if( RubikState.getCurrentState()==RubikState.SOLV )
|
|
416 |
if( StateList.getCurrentState()== StateList.SOLV )
|
|
417 | 417 |
{ |
418 |
RubikStateSolving solving = (RubikStateSolving)RubikState.SOLV.getStateClass();
|
|
418 |
RubikStateSolving solving = (RubikStateSolving) StateList.SOLV.getStateClass();
|
|
419 | 419 |
solving.addMove(mCurrentAxis, mCurrentRow, angle); |
420 | 420 |
} |
421 |
if( RubikState.getCurrentState()==RubikState.PLAY )
|
|
421 |
if( StateList.getCurrentState()== StateList.PLAY )
|
|
422 | 422 |
{ |
423 |
RubikStatePlay play = (RubikStatePlay)RubikState.PLAY.getStateClass();
|
|
423 |
RubikStatePlay play = (RubikStatePlay) StateList.PLAY.getStateClass();
|
|
424 | 424 |
play.addMove(mCurrentAxis, mCurrentRow, angle); |
425 | 425 |
} |
426 | 426 |
} |
... | ... | |
474 | 474 |
|
475 | 475 |
object.beginNewRotation( mCurrentAxis, mCurrentRow ); |
476 | 476 |
|
477 |
if( RubikState.getCurrentState()==RubikState.READ )
|
|
477 |
if( StateList.getCurrentState()== StateList.READ )
|
|
478 | 478 |
{ |
479 |
RubikStateSolving solving = (RubikStateSolving)RubikState.SOLV.getStateClass();
|
|
479 |
RubikStateSolving solving = (RubikStateSolving) StateList.SOLV.getStateClass();
|
|
480 | 480 |
solving.resetElapsed(); |
481 | 481 |
|
482 | 482 |
final RubikActivity act = (RubikActivity)getContext(); |
... | ... | |
486 | 486 |
@Override |
487 | 487 |
public void run() |
488 | 488 |
{ |
489 |
RubikState.switchState( act, RubikState.SOLV);
|
|
489 |
StateList.switchState( act, StateList.SOLV);
|
|
490 | 490 |
} |
491 | 491 |
}); |
492 | 492 |
} |
Also available in: Unified diff
Rename some classes.