From c7e39a22fe0a2bc6da7226fcb29f42fc65e08659 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 3 Apr 2002 06:34:25 +0000 Subject: Gnuchess can be played against (up until a pawn take occurs). --- chess.el | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'chess.el') diff --git a/chess.el b/chess.el index 0710dc9..4d74a4e 100644 --- a/chess.el +++ b/chess.el @@ -126,25 +126,24 @@ a0 243 (defun chess-handler (session window-config event &rest args) "React to changes on the chess board in a global Emacs way." - (cond - ((eq event 'initialize) - (current-window-configuration)) - - ((eq event 'shutdown) - (ignore (set-window-configuration window-config))) + (if (eq event 'initialize) + (current-window-configuration) + (ignore + (cond + ((eq event 'shutdown) + (set-window-configuration window-config)) - ((eq event 'setup) - (ignore (chess-session-set-data session 'current-game (car args)))) + ((eq event 'setup) + (chess-session-set-data session 'current-game (car args))) - ((eq event 'pass) - (ignore - (let ((color (not (chess-session-data session 'my-color)))) - (message "You are now playing %s" (if color "White" "Black")) - (chess-session-set-data session 'my-color (not color))))) + ((eq event 'pass) + (let ((color (not (chess-session-data session 'my-color)))) + (message "You are now playing %s" (if color "White" "Black")) + (chess-session-set-data session 'my-color (not color)))) - ((eq event 'move) - (chess-game-move (chess-session-data session 'current-game) - (car args))))) + ((eq event 'move) + (chess-game-move (chess-session-data session 'current-game) + (car args))))))) (aset chess-puzzle-locations 3 puzzle-engine))))))) (provide 'chess) -- cgit v1.2.3