Project

General

Profile

« Previous | Next » 

Revision 2e8ec627

Added by Leszek Koltunski about 4 years ago

Fixes for the fact that one could easily cheat - just pause the app while solving and come back to it, the time would reset to 0 and the object to unscrambled :(

View differences:

src/main/java/org/distorted/main/RubikSurfaceView.java
375 375

  
376 376
                                           if( RubikState.getCurrentState()==RubikState.READ )
377 377
                                             {
378
                                             RubikStateSolving solving = (RubikStateSolving)RubikState.SOLV.getStateClass();
379
                                             solving.resetElapsed();
380

  
378 381
                                             final RubikActivity act = (RubikActivity)getContext();
379 382

  
380 383
                                             act.runOnUiThread(new Runnable()
......
385 388
                                                 RubikState.switchState( act, RubikState.SOLV);
386 389
                                                 }
387 390
                                               });
388

  
389
                                             RubikStateSolving solving = (RubikStateSolving)RubikState.SOLV.getStateClass();
390
                                             solving.startCounting( (RubikActivity)getContext() );
391 391
                                             }
392 392

  
393 393
                                           mBeginningRotation = false;

Also available in: Unified diff