summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chess-ply.el3
-rw-r--r--chess-pos.el5
2 files changed, 4 insertions, 4 deletions
diff --git a/chess-ply.el b/chess-ply.el
index 1d42f53..f44553b 100644
--- a/chess-ply.el
+++ b/chess-ply.el
@@ -248,7 +248,8 @@ maneuver."
(let ((target (or pos (chess-incr-index candidate rank-adj file-adj))))
(if (and (or (not specific-target)
(= target specific-target))
- (chess-pos-legal-moves position color target candidate))
+ (chess-pos-legal-moves position color target
+ (list candidate)))
(if chess-ply-throw-if-any
(throw 'any-found t)
(let ((ply (chess-ply-create position t candidate target)))
diff --git a/chess-pos.el b/chess-pos.el
index 9fe2648..9564d6d 100644
--- a/chess-pos.el
+++ b/chess-pos.el
@@ -527,13 +527,12 @@ indices which indicate where a piece may have moved from."
;; been eliminated.
(if (and candidates (char-valid-p piece))
(setq candidates
- (apply 'chess-pos-legal-moves
- position color target candidates)))
+ (chess-pos-legal-moves position color target candidates)))
;; return the final list of candidate moves
candidates))
-(defun chess-pos-legal-moves (position color target &rest candidates)
+(defun chess-pos-legal-moves (position color target candidates)
"Test if TARGET can legally be reached by any of CANDIDATES.
Return the list of candidates that can reach it.