From 42d3479f1b83a50714f7cbc17925ac0201a55022 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 16 Apr 2002 22:01:40 +0000 Subject: Report checkmate in the modeline correctly. --- chess-display.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'chess-display.el') diff --git a/chess-display.el b/chess-display.el index 0bdbdaf..1ebe9ba 100644 --- a/chess-display.el +++ b/chess-display.el @@ -178,13 +178,12 @@ also view the same game." (chess-ply-to-algebraic (chess-game-ply chess-module-game (1- index))))) chess-display-side-to-move - (let ((final (chess-ply-final-p - (chess-game-ply chess-module-game index)))) + (let ((status (chess-game-status chess-module-game index))) (cond - ((eq final :checkmate) (chess-string 'mode-checkmate)) - ((eq final :resign) (chess-string 'mode-resigned)) - ((eq final :stalemate) (chess-string 'mode-stalemate)) - ((eq final :draw) (chess-string 'mode-drawn)) + ((eq status :resign) (chess-string 'mode-resigned)) + ((eq status :draw) (chess-string 'mode-drawn)) + ((eq status :checkmate) (chess-string 'mode-checkmate)) + ((eq status :stalemate) (chess-string 'mode-stalemate)) (t (if (chess-game-side-to-move chess-module-game) (chess-string 'mode-white) -- cgit v1.2.3