diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-16 22:01:40 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-16 22:01:40 +0000 |
| commit | 42d3479f1b83a50714f7cbc17925ac0201a55022 (patch) | |
| tree | 3c1128dcd4a8b06db6674a2475b8c2b3866425f2 /chess-display.el | |
| parent | 7c74ccf902b4a63128ee11db1e138a4eadfb7fd7 (diff) | |
Report checkmate in the modeline correctly.
Diffstat (limited to 'chess-display.el')
| -rw-r--r-- | chess-display.el | 11 |
1 files changed, 5 insertions, 6 deletions
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) |
