From e4f21502de2a89ecbf38d0a8e6b656df086c8982 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 19 Jun 2002 21:51:14 +0000 Subject: *** no comment *** --- PLAN | 4 ++++ chess-game.el | 5 +---- chess-ply.el | 6 ++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/PLAN b/PLAN index 988cfe2..78333ae 100644 --- a/PLAN +++ b/PLAN @@ -51,6 +51,10 @@ chess-irc chess-ply - detect games drawn by three-fold repetition +chess-pos +- if I checkmate someone, the last position does not have its status + set to :checkmate + chess-german - complete translation diff --git a/chess-game.el b/chess-game.el index 231cc03..c66d04b 100644 --- a/chess-game.el +++ b/chess-game.el @@ -179,10 +179,7 @@ matches." This conveys the status of the game at the given index." (assert game) (or (chess-pos-status (chess-game-pos game index)) - (let ((final (chess-ply-final-p (chess-game-ply game index)))) - (and (memq final '(:aborted :resign :drawn :perpetual :repetition - :flag-fell)) - final)))) + (chess-ply-final-p (chess-game-ply game index)))) (defsubst chess-game-index (game) "Return the GAME's current position index." diff --git a/chess-ply.el b/chess-ply.el index 321da83..4ef3558 100644 --- a/chess-ply.el +++ b/chess-ply.el @@ -259,8 +259,10 @@ maneuver." (defsubst chess-ply-final-p (ply) "Return non-nil if this is the last ply of a game/variation." - (chess-ply-any-keyword ply :drawn :perpetual :repetition :stalemate - :flag-fell :resign :checkmate :aborted)) + (or (chess-ply-any-keyword ply :drawn :perpetual :repetition + :flag-fell :resign :aborted) + (chess-ply-any-keyword (chess-pos-preceding-ply + (chess-ply-pos ply)) :stalemate :checkmate))) (eval-when-compile (defvar position) -- cgit v1.2.3