[gnome-games] lightsoff: Fix transition of won board



commit ce979df7eff3c836bf794f28c9af54703b5d5656
Author: Adam Matousek <adydas95 gmail com>
Date:   Fri Aug 10 14:37:22 2012 +0200

    lightsoff: Fix transition of won board
    
    There was a wrong operator in the condition of direction generation,
    so instead of generating a random direction different from the last
    one, it used only two directions left and down.
    Now it works fine and directions are changed randomly.
    
    See http://bugzilla.gnome.org/show_bug.cgi?id=681597

 lightsoff/src/game-view.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lightsoff/src/game-view.vala b/lightsoff/src/game-view.vala
index d4eae5b..a0c040b 100644
--- a/lightsoff/src/game-view.vala
+++ b/lightsoff/src/game-view.vala
@@ -148,7 +148,7 @@ public class GameView : Clutter.Group
             direction = Random.int_range (0, 2); // x or y
             sign = Random.boolean () ? 1 : -1; // left/right up/down
         }
-        while (last_direction == direction || last_sign == sign);
+        while (last_direction == direction && last_sign == sign);
         last_direction = direction;
         last_sign = sign;
 



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