diff options
| author | John Wiegley <johnw@newartisans.com> | 2002-04-03 06:34:25 +0000 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2002-04-03 06:34:25 +0000 |
| commit | c7e39a22fe0a2bc6da7226fcb29f42fc65e08659 (patch) | |
| tree | 31023cd6824d396b16d1c3960d86f3c78f763018 /chess.el | |
| parent | bc1b6e4f3789f4401ac5fe9bb9708459648345b0 (diff) | |
Gnuchess can be played against (up until a pawn take occurs).
Diffstat (limited to 'chess.el')
| -rw-r--r-- | chess.el | 31 |
1 files changed, 15 insertions, 16 deletions
@@ -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) |
