From 2ef00c4beddb77e546cdc212cc502c5a9a4bba6c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 7 Apr 2002 08:44:00 +0000 Subject: 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. --- chess-pos.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'chess-pos.el') 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) -- cgit v1.2.3