[gnome-chess] Claim draw is only allowed on your own turn



commit 9fcb7455a8f71998c7005eaa02709449392c724c
Author: Michael Catanzaro <mike catanzaro gmail com>
Date:   Sun May 26 13:31:34 2013 -0500

    Claim draw is only allowed on your own turn

 src/gnome-chess.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index b4f7147..9db0db7 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -849,7 +849,9 @@ public class Application : Gtk.Application
     {
         var can_resign = game.n_moves > 0;
         resign_menu.sensitive = resign_button.sensitive = can_resign;
-        claim_draw_menu.sensitive = can_resign;
+
+        /* Claim draw only allowed on your own turn */        
+        claim_draw_menu.sensitive = can_resign && game.current_player != opponent;
 
         /* Can undo once the human player has made a move */
         var can_undo = game.n_moves > 0;


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