[gnome-chess] Fix detection of draws by the fifty-move rule



commit 0d7098b8d5bce09d2bdf372725f1eed4db98bbb7
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Aug 11 16:51:18 2013 -0500

    Fix detection of draws by the fifty-move rule
    
    The halfmove clock was reset to zero each time we copied a ChessState
    object.

 src/chess-game.vala |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/chess-game.vala b/src/chess-game.vala
index f65815e..0e67111 100644
--- a/src/chess-game.vala
+++ b/src/chess-game.vala
@@ -418,6 +418,7 @@ public class ChessState
             state.board[i] = board[i];
         state.piece_masks[Color.WHITE] = piece_masks[Color.WHITE];
         state.piece_masks[Color.BLACK] = piece_masks[Color.BLACK];
+        state.halfmove_clock = halfmove_clock;
 
         return state;
     }


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