diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-26 03:27:40 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-26 03:27:40 +0000 |
| commit | 0e302a828c7e79491b5055cbeb0d8879cc3d8558 (patch) | |
| tree | 3b666f8db828ec78a449e2cad38a328c190a1985 /chess-display.el | |
| parent | 738ff9a3b57b5e317e086a9ee4878fbb45f24b3e (diff) | |
fixes
Diffstat (limited to 'chess-display.el')
| -rw-r--r-- | chess-display.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/chess-display.el b/chess-display.el index 8c95d15..5e63f1e 100644 --- a/chess-display.el +++ b/chess-display.el @@ -175,8 +175,7 @@ also view the same game." (defun chess-display-clock-string () (let ((white (chess-game-data chess-module-game 'white-remaining)) (black (chess-game-data chess-module-game 'black-remaining))) - (if (and (not (and white black)) - (> chess-display-index 0)) + (if (not (and white black)) (let ((last-ply (chess-game-ply chess-module-game (1- chess-display-index)))) (setq white (chess-ply-keyword last-ply :white) @@ -271,9 +270,16 @@ also view the same game." (to (cadr ch))) (funcall chess-display-event-handler 'draw-square (chess-display-index-pos nil from) ? from) - (funcall chess-display-event-handler 'draw-square - (chess-display-index-pos nil to) - (chess-pos-piece position from) to)) + (let ((new-piece (chess-ply-keyword ply :promote))) + (if new-piece + (funcall chess-display-event-handler 'draw-square + (chess-display-index-pos nil to) + (if (chess-pos-side-to-move position) + new-piece + (downcase new-piece)) to) + (funcall chess-display-event-handler 'draw-square + (chess-display-index-pos nil to) + (chess-pos-piece position from) to)))) (setq ch (cddr ch))))))) (chess-message-catalog 'english |
