[gnome-games/gsoc-seed-games] [lightsoff] Small fix to code to ensure transition direction changes



commit 7343c9282dbc10f17a397c79cd199e6f05771f46
Author: Tim Horton <hortont424 gmail com>
Date:   Mon Jun 29 01:26:36 2009 -0400

    [lightsoff] Small fix to code to ensure transition direction changes

 lightsoff/Game.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lightsoff/Game.js b/lightsoff/Game.js
index ccf7485..97e0d3c 100644
--- a/lightsoff/Game.js
+++ b/lightsoff/Game.js
@@ -64,7 +64,7 @@ GameView = new GType({
 				direction = Math.floor(2 * Math.random());
 				sign = Math.floor(2 * Math.random()) ? 1 : -1;
 			}
-			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]