[gnome-chess/gnome-3-8] Disallow resigning for your opponent (cherry picked from commit 7f3c7020218673709c7cbf1d8842e9685ecc



commit 26fe993ee21a856fe6d630777d2ce53aa70376bc
Author: Michael Catanzaro <mike catanzaro gmail com>
Date:   Sun May 12 21:49:40 2013 -0500

    Disallow resigning for your opponent
    (cherry picked from commit 7f3c7020218673709c7cbf1d8842e9685ecc19c8)

 src/gnome-chess.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 6cfb946..18a68e3 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -846,7 +846,7 @@ public class Application : Gtk.Application
     
     private void update_control_buttons ()
     {
-        var can_resign = game.n_moves > 0;
+        var can_resign = game.n_moves > 0 && game.current_player != opponent;
         resign_menu.sensitive = resign_button.sensitive = can_resign;
 
         /* Can undo once the human player has made a move */


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