summaryrefslogtreecommitdiff
path: root/chess.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-03 06:34:25 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-03 06:34:25 +0000
commitc7e39a22fe0a2bc6da7226fcb29f42fc65e08659 (patch)
tree31023cd6824d396b16d1c3960d86f3c78f763018 /chess.el
parentbc1b6e4f3789f4401ac5fe9bb9708459648345b0 (diff)
Gnuchess can be played against (up until a pawn take occurs).
Diffstat (limited to 'chess.el')
-rw-r--r--chess.el31
1 files changed, 15 insertions, 16 deletions
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)