[gnome-mines] Fix timer not stopping when game ends via multi-release
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-mines] Fix timer not stopping when game ends via multi-release
- Date: Sat, 17 Oct 2020 15:16:57 +0000 (UTC)
commit 1ede3f7750ba45aad8724c280aa5f8c851c195eb
Author: Christian <christian guinard dal ca>
Date: Mon Oct 5 14:21:10 2020 -0300
Fix timer not stopping when game ends via multi-release
src/minefield.vala | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/minefield.vala b/src/minefield.vala
index 8702a1a..faf92e3 100644
--- a/src/minefield.vala
+++ b/src/minefield.vala
@@ -207,10 +207,13 @@ public class Minefield : Object
if (!is_location (nx, ny))
continue;
- if (do_clear && get_flag (nx, ny) != FlagType.FLAG)
+ if (do_clear && get_flag (nx, ny) != FlagType.FLAG){
clear_mine (nx, ny);
- else
+ if (clock == null)
+ return;
+ } else {
set_flag (nx, ny, FlagType.FLAG);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]