Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active Mar 1, 2017
Embed
What would you like to do?
(defn render-cell
"Dispatch the rendering of the cell based on the player"
[[coord owner :as cell] on-move]
(let [renderer (case owner
:owner/cross render-cross
:owner/circle render-circle
render-square)]
(renderer coord {:on-click #(on-move coord)})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment