[iagno/gnome-3-10] Fix Undo after human player has passed
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno/gnome-3-10] Fix Undo after human player has passed
- Date: Mon, 30 Sep 2013 00:34:30 +0000 (UTC)
commit 76f914dc996c4a90dde6b6312743005d1c61974f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Sep 29 19:31:19 2013 -0500
Fix Undo after human player has passed
https://bugzilla.gnome.org/show_bug.cgi?id=679133
src/game.vala | 2 --
src/iagno.vala | 6 ++++++
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/game.vala b/src/game.vala
index 9fee40a..f0a8169 100644
--- a/src/game.vala
+++ b/src/game.vala
@@ -283,8 +283,6 @@ public class Game
/* Previous player to move again */
flip_current_color ();
}
-
- move ();
}
private void set_tile (int x, int y, Player color, bool update_history)
diff --git a/src/iagno.vala b/src/iagno.vala
index 87a145b..b69790b 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -285,6 +285,12 @@ public class Iagno : Gtk.Application
game.undo (1);
else
game.undo (2);
+
+ /* If forced to pass, undo to last chosen move */
+ while (!game.can_move)
+ game.undo (2);
+
+ game_move_cb (game);
}
private void about_cb ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]