      options)])
 
 (defn- empty-cell
-  [[x y :as position] cb player]
+  [[x y :as position] interactions player]
   (rect-cell position player
-    {:on-click #(cb/on-player-move cb x y)}))
+    {:on-click #(i/on-player-move interactions x y)}))
 
 (defn- empty-svg-board []
   [:svg.board

(ns triboard.view.board
  (:require
    [triboard.logic.board :as board]
    [triboard.view.interactions :as cb]
    [triboard.view.utils :as vutils]))


;; ----------------------------------------------------------------------------
;; Private
;; ----------------------------------------------------------------------------

;; TODO - Square SVG Board utils

(def relative-size 0.9)
(def border-size (/ (- 1 relative-size) 2))

;; ----------------------------------------------------------------------------

(defn render-board
  [board suggestions interactions]
  (into
    (empty-svg-board)
    (for [[position cell] (board/to-seq board)]
      ^{:key position}
      (if (= :none cell)
        [empty-cell position interactions
         (if (suggestions position) :help :none)]
        [rect-cell position cell])
      )))
