Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun rook-limited (length directions)
- (concatenate 'list
- (when (member 'forward directions) (loop for i from 1 to length collect `( 0 . ,i)))
- (when (member 'backward directions) (loop for i from -1 downto (- length) collect `( 0 . ,i)))
- (when (member 'left directions) (loop for i from -1 downto (- length) collect `(,i . 0)))
- (when (member 'right directions) (loop for i from 1 to length collect `(,i . 0)))))
Advertisement
Add Comment
Please, Sign In to add comment