diff options
| -rw-r--r-- | chess-pos.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chess-pos.el b/chess-pos.el index 0956fe5..2b2a913 100644 --- a/chess-pos.el +++ b/chess-pos.el @@ -643,6 +643,12 @@ trying to move a blank square." (= (car changes) (chess-pos-can-castle position (if color ?K ?k)))) (chess-pos-set-can-castle position (if color ?K ?k) nil)))) + ((let ((can-castle (chess-pos-can-castle position (if color ?q ?Q)))) + (and can-castle (= (cadr changes) can-castle))) + (chess-pos-set-can-castle position (if color ?q ?Q) nil)) + ((let ((can-castle (chess-pos-can-castle position (if color ?k ?K)))) + (and can-castle (= (cadr changes) can-castle))) + (chess-pos-set-can-castle position (if color ?k ?K) nil)) ((and (= piece ?p) (> (abs (- (chess-index-rank (cadr changes)) |
