From b5d364506be25f41b232f91f19c6aaf79a76c4dc Mon Sep 17 00:00:00 2001 From: gitknilch Date: Sat, 9 Mar 2013 20:45:52 +0100 Subject: [PATCH 1/1] remove checks for app.timeCounter. timer is always running, but not 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 --- src/de/cwde/freeshisen/ShisenShoView.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/de/cwde/freeshisen/ShisenShoView.java b/src/de/cwde/freeshisen/ShisenShoView.java index 2864811..d8af296 100644 --- a/src/de/cwde/freeshisen/ShisenShoView.java +++ b/src/de/cwde/freeshisen/ShisenShoView.java @@ -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(); -- 2.39.2