[iagno/gnome-3-8] Game: remove useless Start method



commit b316ffc62ac26f11c5044a12658cad7eda32d223
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Fri Sep 27 23:35:40 2013 -0500

    Game: remove useless Start method
    
    Also fixes the piece flipping sound, which isn't intended to play at
    startup.

 src/game.vala  |    8 --------
 src/iagno.vala |    4 +++-
 2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index a068e54..4f7c1dd 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -121,14 +121,6 @@ public class Game
         current_color = Player.DARK;
     }
 
-    public void start ()
-    {
-        if (n_tiles != 4)
-            return;
-
-        move ();
-    }
-
     public Game.copy (Game game)
     {
         tiles = new Player[game.width, game.height];
diff --git a/src/iagno.vala b/src/iagno.vala
index f77e4c7..e4c201e 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -223,7 +223,9 @@ public class Iagno : Gtk.Application
 
         update_ui ();
 
-        game.start ();
+        /* Get the computer to move after a delay (so it looks like it's thinking) */
+        if (dark_computer != null)
+            computer_timer = Timeout.add (1000, computer_move_cb);
     }
 
     private void update_ui ()


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