From 6d80bc77703b2c722f89ad417e9c7ad19dcd9d63 Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Fri, 6 Feb 2004 12:29:33 +0000 Subject: (chess-display-paint-move): Handle :en-passant captures (remove the captured pawn from the board). --- chess-display.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/chess-display.el b/chess-display.el index 7e70f31..b925908 100644 --- a/chess-display.el +++ b/chess-display.el @@ -12,7 +12,8 @@ :group 'chess) (defcustom chess-display-popup t - "If non-nil, popup displays whenever a significant event occurs." + "If non-nil (the default), popup displays whenever a significant event +occurs." :type 'boolean :group 'chess-display) @@ -334,7 +335,11 @@ also view the same game." (downcase new-piece)) to) (funcall chess-display-event-handler 'draw-square (chess-display-index-pos nil to) - (chess-pos-piece position from) to)))) + (chess-pos-piece position from) to))) + (when (chess-ply-keyword ply :en-passant) + (funcall chess-display-event-handler 'draw-square + (chess-display-index-pos nil (chess-pos-en-passant position)) + ? (chess-pos-en-passant position)))) (setq ch (cddr ch))))))) (chess-message-catalog 'english -- cgit v1.2.3