diff options
| author | Mario Lang <mlang@delysid.org> | 2014-04-18 01:11:49 +0200 |
|---|---|---|
| committer | Mario Lang <mlang@delysid.org> | 2014-04-18 01:11:49 +0200 |
| commit | 2be8f82158cb102b5847f47a710e89359352d765 (patch) | |
| tree | 077c545d6528c8a28c08f72dea41f7ad15465e7c /chess-ply.el | |
| parent | e4613cc7ece3f82b67e88e5af8db09079ddc1657 (diff) | |
chess-legal-plies: Generate R and B promotions in addtion to Q and N.
Diffstat (limited to 'chess-ply.el')
| -rw-r--r-- | chess-ply.el | 7 |
1 files 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))))) |
