[iagno/gnome-3-8] Fix computer vs. computer new game
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno/gnome-3-8] Fix computer vs. computer new game
- Date: Mon, 23 Sep 2013 23:37:15 +0000 (UTC)
commit d6a403b8c81eb5d2a32b6bea42bf463a0d2ce24d
Author: Dave Paul <hi my name is dave gmail com>
Date: Wed Sep 18 22:47:21 2013 -0600
Fix computer vs. computer new game
Previously, if you started a new computer vs. computer game while
another was already in progress, the computer would start playing
too often, resulting in all kinds of problems.
https://bugzilla.gnome.org/show_bug.cgi?id=708343
src/iagno.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/iagno.vala b/src/iagno.vala
index 2788322..bdf6d72 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -354,11 +354,14 @@ public class Iagno : Gtk.Application
private bool computer_move_cb ()
{
+ /* set computer_timer to 0 *before* calling move() since that will
+ * call game_move_cb and possibly create a new timer.
+ */
+ computer_timer = 0;
if (game.current_color == Player.LIGHT)
light_computer.move ();
else
dark_computer.move ();
- computer_timer = 0;
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]