[gnome-2048] Fix GameOver showing on resume.



commit 9ce68ad198f6d15972ba32e095a5f0e3d47b0f5b
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat May 18 16:14:32 2019 +0200

    Fix GameOver showing on resume.
    
    Fixes #11.

 src/game.vala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index 738fb9a..dc9a0ee 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -652,10 +652,10 @@ private class Game : Object
             _grid.target_value_reached = false;
         }
 
-        if (_just_restored)
-            finished (/* show scores */ false);
-        else
+        if (!_just_restored)
             _finish_move_id = GLib.Timeout.add (100, _finish_move);
+        else if (_grid.is_finished ())
+            finished (/* show scores */ false);
     }
 
     private bool _finish_move ()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]