Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active March 1, 2017 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/b9c97031cd4562354430d7616d147bdf to your computer and use it in GitHub Desktop.
Save deque-blog/b9c97031cd4562354430d7616d147bdf to your computer and use it in GitHub Desktop.
(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