remove checks for app.timeCounter. timer is always running, but not
authorgitknilch <gitknilch@cwde.de>
Sat, 9 Mar 2013 19:45:52 +0000 (20:45 +0100)
committergitknilch <gitknilch@cwde.de>
Sat, 9 Mar 2013 19:45:52 +0000 (20:45 +0100)
displayed if disabled.
this means you'll get a hiscore entry even if you disable time counter
display. is this a good idea?

Change-Id: Idcdcfea61f2f99fb41e6f08e714249eaac581368
Signed-off-by: gitknilch <gitknilch@cwde.de>
src/de/cwde/freeshisen/ShisenShoView.java

index 28648114f90a734249991e0ff904f8418d262c28..d8af2963872909bab996c489889ead278d1a5df8 100644 (file)
@@ -198,7 +198,7 @@ class ShisenShoView extends SurfaceView implements SurfaceHolder.Callback {
                startTime=System.currentTimeMillis();
                playTime=0;
                baseTime=0;
-               if (app.timeCounter && !timerRegistered) {
+               if (!timerRegistered) {
                        registerTimer();
                }
                pairs=app.board.getPairs(1);
@@ -242,7 +242,7 @@ class ShisenShoView extends SurfaceView implements SurfaceHolder.Callback {
 
        private void onUndoActivate() {
                if (app.board.getCanUndo()) {
-                       if (cstate==StatePlay.GAMEOVER && app.timeCounter && !timerRegistered) {
+                       if (cstate==StatePlay.GAMEOVER && !timerRegistered) {
                                // Reprogram the time update that had been
                                // deactivated with the game over status
                                registerTimer();
@@ -255,7 +255,7 @@ class ShisenShoView extends SurfaceView implements SurfaceHolder.Callback {
        }
 
        public void onTimeCounterActivate() {
-               if (app.timeCounter && cstate!=StatePlay.GAMEOVER && !timerRegistered) {
+               if (cstate!=StatePlay.GAMEOVER && !timerRegistered) {
                        // Reprogram the time update that had been
                        // deactivated with the time_counter=false
                        registerTimer();
@@ -264,7 +264,7 @@ class ShisenShoView extends SurfaceView implements SurfaceHolder.Callback {
 
        private void onUpdateTime() {
                paint(pstate);
-               if (!(app.timeCounter && cstate!=StatePlay.GAMEOVER)) {
+               if (cstate==StatePlay.GAMEOVER) {
                        unregisterTimer();
                }
        }
@@ -564,7 +564,7 @@ class ShisenShoView extends SurfaceView implements SurfaceHolder.Callback {
        public void surfaceChanged(SurfaceHolder holder, int format, int width,
                        int height) {
                surfaceHolder = holder;
-               if (cstate!=StatePlay.GAMEOVER && app.timeCounter && !timerRegistered) {
+               if (cstate!=StatePlay.GAMEOVER && !timerRegistered) {
                        registerTimer();
                }
                repaint();
Impressum, Datenschutz