mlang pushed a commit to branch externals/chess in repository elpa. commit eecd6f4f1a3ff3e955b62871deb9701d656f6e3f Author: Mario Lang <ml...@delysid.org> Date: Mon Jun 16 15:22:54 2014 +0200
* chess-ply.el (chess-legal-plies): Make :file keyword usable if :color is specified. --- ChangeLog | 3 +++ chess-ply.el | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec4d840..c7c40c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-06-16 Mario Lang <ml...@delysid.org> + * chess-ply.el (chess-legal-plies): Make :file keyword usable if :color + is specified. + * chess-input.el (chess-input-display-moves): Highlight valid target squares if `chess-display-highlight-legal' is non-nil. (chess-input-shortcut): Redraw board to remove highlights if a ply diff --git a/chess-ply.el b/chess-ply.el index cf463cb..fd5dc21 100644 --- a/chess-ply.el +++ b/chess-ply.el @@ -305,7 +305,7 @@ KEYWORDS allowed are: :any return t if any piece can move at all :color <t or nil> :piece <piece character> - :file <number 0 to 7> [can only be used if :piece is present] + :file <number 0 to 7> [:piece or :color must be present] :index <coordinate index> :target <specific target index> :candidates <list of inddices> @@ -358,7 +358,7 @@ position object passed in." (let (candidates) (dotimes (rank 8) (setq pos (chess-rf-to-index rank file)) - (if (chess-pos-piece-p position pos piece) + (if (chess-pos-piece-p position pos (or piece color)) (push pos candidates))) candidates)) (t