summaryrefslogtreecommitdiff
path: root/chess-pos.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2002-04-07 08:44:00 +0000
committerJohn Wiegley <johnw@newartisans.com>2002-04-07 08:44:00 +0000
commit2ef00c4beddb77e546cdc212cc502c5a9a4bba6c (patch)
treef20a250ce3e162fd5580696528d7b8251cdcfcf4 /chess-pos.el
parentb148d84be1c3bd781c4fd11dd0a928fbeeda28fd (diff)
Simplified the event model, and removed session objects. Now
everything just revolves around a game. Gnuchess is now playable to the end, except don't make moves that leave your king in check! The engine still doesn't check for this yet.
Diffstat (limited to 'chess-pos.el')
-rw-r--r--chess-pos.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/chess-pos.el b/chess-pos.el
index 5eef9c1..b67070a 100644
--- a/chess-pos.el
+++ b/chess-pos.el
@@ -239,13 +239,13 @@ trying to move a blank square."
(if (= piece ? )
(error "Attempted piece move from blank square %s" from))
(chess-pos-set-piece position from ? )
- (chess-pos-set-piece position to piece)
- ;; once a piece is moved, en passant is no longer available
- (chess-pos-set-en-passant position nil)
- ;; toggle the side whose move it is
- (chess-pos-set-side-to-move
- position (not (chess-pos-side-to-move position)))))
+ (chess-pos-set-piece position to piece)))
(setq changes (cddr changes)))
+ ;; once a piece is moved, en passant is no longer available
+ (chess-pos-set-en-passant position nil)
+ ;; toggle the side whose move it is
+ (chess-pos-set-side-to-move position
+ (not (chess-pos-side-to-move position)))
position)
(provide 'chess-pos)