                (min (:height data) (:width data))
                0.03)})
 
-;;--------------------------------------------------------
-;;--REAGENT/REACT COMPONENTS AND HELPER FUNCTIONS TO THOSE
-(defn slider-view
-  "adjusts the size of the board"
-  [state]
-  [:input {:type "range" :value (:width state) :min 250 :max 700
-           :style {:width "200px"}
-           :on-change (fn [e]
-                        (let [val (js/parseInt (.-target.value e))]
-                          (swap! app-state assoc :width val :height val)))}])
+;;---------------------------------------------------
+;;--NORMAL HELPER FUNCTIONS TO HELP COMPUTE THE STATE
+(defn color-of-piece
+  [board [row col]]
+  (if (black? (get-in board [row col :piece]))
+    :black
+    :white))
 
 (defn out-of-board?
   "returns all possible locations for a given piece

        :black init-black-bindings}
       :turn :white}))

(defonce black #{\u265F \u265C \u265E \u265D \u265B \u265A})

(defonce white #{\u2659 \u2656 \u2658 \u2657 \u2655 \u2654})

(defonce app-state (r/atom init-state))
#_(swap! app-state assoc :height 500)

  []
  [:div
   [:div "Size:"]
   [slider-view]
   [board-view @app-state]
   [input-view]])

;; --------------------
;; --INITIALIZE THE APP
(defn mount-root []
  (r/render [app-view] (.getElementById js/document "app")))

