summaryrefslogtreecommitdiff
path: root/chess-pos.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-16 22:12:03 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-16 22:12:03 +0000
commit8b186795676c8f7e107e1879d3d46907fdf9db2c (patch)
treecee07ef07c87c421c58f1b1b7a70df16ea32919f /chess-pos.el
parent42d3479f1b83a50714f7cbc17925ac0201a55022 (diff)
Fixed pos status not being updated.
Diffstat (limited to 'chess-pos.el')
-rw-r--r--chess-pos.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/chess-pos.el b/chess-pos.el
index ae12a93..384a028 100644
--- a/chess-pos.el
+++ b/chess-pos.el
@@ -139,7 +139,9 @@ Also, EPD evaluation numbers/strings can be set here."
(defsubst chess-pos-set-status (position &rest values)
"Set whether the side to move is in a special state."
- (aset position 69 values))
+ (if (equal '(nil) value)
+ (aset position 69 nil)
+ (aset position 69 values)))
(defsubst chess-pos-side-to-move (position)
"Return the color whose move it is in POSITION."
@@ -321,6 +323,7 @@ trying to move a blank square."
(downcase new-piece)))))
;; did we leave the position in check, mate or stalemate?
+ (chess-pos-set-status position nil))
(cond
((memq :check changes)
(chess-pos-set-status position :check))