[iagno] Game: remove useless Start method
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno] Game: remove useless Start method
- Date: Sat, 28 Sep 2013 23:41:44 +0000 (UTC)
commit 2353e560339e5d9e3720ebdc6685c6d52d585f82
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Sep 27 23:35:40 2013 -0500
Game: remove useless Start method
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 f0fa393..450a2d3 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -75,14 +75,6 @@ public class Game : Object
current_color = Player.DARK;
}
- public void start ()
- {
- if (n_tiles != 4)
- return;
-
- move ();
- }
-
public Game.from_strings (string[] setup, Player to_move, int width = 8, int height = 8)
requires (setup.length == height)
requires (setup[0].length == width)
diff --git a/src/iagno.vala b/src/iagno.vala
index 8631fad..610dcf6 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -238,7 +238,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]