[quadrapassel/gnome-3-8] Allow preview next block with pick difficult block



commit 31ea50142c3570b6f6e6a35129521689ec7e7af2
Author: Michael Catanzaro <mike catanzaro gmail com>
Date:   Mon May 20 20:07:01 2013 -0500

    Allow preview next block with pick difficult block
    
    These options are orthogonal.
    (cherry picked from commit e5a2e7abeea48b94a00902e17f27534f5157e7f3)

 src/game.vala |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index 31e9eb2..5ce78ca 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -311,7 +311,9 @@ public class Game : Object
             }
         }
 
-        if (!pick_difficult_blocks)
+        if (pick_difficult_blocks)
+            next_shape = pick_difficult_shape ();
+        else
             next_shape = pick_random_shape ();
     }
 
@@ -426,13 +428,12 @@ public class Game : Object
 
     private void add_shape ()
     {
+        shape = (owned) next_shape;
+
         if (pick_difficult_blocks)
-            shape = pick_difficult_shape ();
+            next_shape = pick_difficult_shape ();
         else
-        {
-            shape = (owned) next_shape;
             next_shape = pick_random_shape ();
-        }
 
         foreach (var b in shape.blocks)
         {


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