Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
(def relative-size 0.9)
(def border-size (/ (- 1 relative-size) 2))
(defn- rect-cell
[[x y] player options]
{:class (str "cell--" (name player))
:x (+ border-size x) :width relative-size
:y (+ border-size y) :height relative-size}
(defn- empty-cell
[[x y :as position] interactions player]
(rect-cell position player
{:on-click #(i/on-player-move interactions x y)}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment