Created
March 8, 2017 23:34
-
-
Save deque-blog/843ca73f0a161d52a0895668e7cf29eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- ^boolean empty-cell? | |
[board [x y]] | |
(= :none (aget board x y))) | |
(defn- available-jumps-at | |
"Provides the list of jumps that can be done at a given `jump-destination`" | |
[board jump-destination] | |
(if (empty-cell? board jump-destination) | |
(eduction | |
(keep #(seek-jump-source-toward board jump-destination %)) | |
cst/directions))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment