[gnome-games] iagno: Game.copy should use width/height from the original



commit b2554eaa4b96e56e43bc29859b1fcd13984ad2f9
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date:   Wed Mar 7 20:00:25 2012 +0100

    iagno: Game.copy should use width/height from the original
    
    Before it would use the properties on the new instance that would both be 0.
    
    The bug will only occur when the AI must make a move on a board with >8 pieces.
    
    GNOME bug #668553

 iagno/src/game.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/iagno/src/game.vala b/iagno/src/game.vala
index c1f2f7f..d6430ac 100644
--- a/iagno/src/game.vala
+++ b/iagno/src/game.vala
@@ -111,7 +111,7 @@ public class Game
 
     public Game.copy (Game game)
     {
-        tiles = new Player[width, height];
+        tiles = new Player[game.width, game.height];
         for (var x = 0; x < width; x++)
             for (var y = 0; y < height; y++)
                 tiles[x, y] = game.tiles[x, y];



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