[iagno/gnome-3-10] Game: remove useless Start method
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno/gnome-3-10] Game: remove useless Start method
- Date: Mon, 30 Sep 2013 00:07:50 +0000 (UTC)
commit bab03e72aff0ef494930b87496b895bd4424fc64
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 f1de703..9fee40a 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -131,14 +131,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 f71e2af..87a145b 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -233,7 +233,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]