[gnome-chess] Add warning when engine makes illegal move



commit b0e0c06ec15084c9568ec9cd78a2d11094d833b1
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Wed Jun 25 10:34:07 2014 -0500

    Add warning when engine makes illegal move

 src/gnome-chess.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index c2640c8..d4ea2b4 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -688,7 +688,10 @@ public class ChessApplication : Gtk.Application
     private void do_engine_move (string move)
     {
         if (!opponent.move (move))
+        {
+            warning ("Engine's move %s is illegal! Engine desync?", move);
             game.stop (ChessResult.BUG, ChessRule.BUG);
+        }
     }
 
     private void engine_move_cb (ChessEngine engine, string move)


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