From 2be8f82158cb102b5847f47a710e89359352d765 Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Fri, 18 Apr 2014 01:11:49 +0200 Subject: chess-legal-plies: Generate R and B promotions in addtion to Q and N. --- chess-ply.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/chess-ply.el b/chess-ply.el index 804bc9d..c316eae 100644 --- a/chess-ply.el +++ b/chess-ply.el @@ -305,12 +305,9 @@ maneuver." (= (chess-index-rank target) (if color 0 7))))) (if promotion - (progn + (dolist (promote '(?Q ?R ?B ?N)) (let ((ply (chess-ply-create position t candidate target - :promote ?Q))) - (when ply (push ply plies))) - (let ((ply (chess-ply-create position t candidate target - :promote ?N))) + :promote promote))) (when ply (push ply plies)))) (let ((ply (chess-ply-create position t candidate target))) (when ply (push ply plies))))) -- cgit v1.2.3