Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created March 8, 2017 23:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
(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