summaryrefslogtreecommitdiff
path: root/chess-common.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-05-16 17:28:18 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-05-16 17:28:18 +0000
commit59d1008283f339d6c6d146979c4cff0c6430b095 (patch)
tree530b969e5568e51caf57dc230a544e141c26bec1 /chess-common.el
parent86493efa7a72ecda178e0ec5e7123c9761a61046 (diff)
miscellaneous fixes
Diffstat (limited to 'chess-common.el')
-rw-r--r--chess-common.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/chess-common.el b/chess-common.el
index ce320b4..4fc26f6 100644
--- a/chess-common.el
+++ b/chess-common.el
@@ -66,6 +66,10 @@
((eq event 'draw)
(chess-message 'draw-offer-declined))
+ ((eq event 'resign)
+ (chess-engine-send nil "resign\n")
+ (chess-game-set-data game 'active nil))
+
((eq event 'new)
(chess-engine-send nil "new\n")
(chess-engine-set-position nil))
@@ -93,13 +97,8 @@
(chess-game-set-tag game "White" chess-full-name)
(chess-game-set-tag game "Black" chess-engine-opponent-name))
- (cond
- ((chess-ply-keyword (car args) :resign)
- (chess-engine-send nil "resign\n"))
- (t
- (chess-engine-send nil (concat (chess-ply-to-algebraic (car args))
- "\n"))))
-
+ (chess-engine-send nil (concat (chess-ply-to-algebraic (car args))
+ "\n"))
(if (chess-game-over-p game)
(chess-game-set-data game 'active nil)))))