 
           (doto ctx
             (.beginPath)
-            (.rect (* x cell-size) (* y cell-size) cell-size cell-size)
+            (.rect (* x cell-width) (* y cell-height) cell-width cell-height)
             (.fill)))
 
         (recur (if (= (dec x) width) 0 (inc x))


;; Constants

; TODO revisit *all* of these atoms
; consolidate them and reconcile them with this "visualization state" atom

(def cell-size 10)
(def grid-width 100)
(def grid-height 100)
(def canvas-height 800)
(def canvas-width 800)

(defonce selected-tab (r/atom :drunkard))
(defonce ms-per-tick (r/atom 16))

   (when (= @selected-tab :drunkard)
     [:div.drunkard-specific
      [:p (str "Dig until there are " @num-empty-cells " empty cells in the grid")]
      [slider num-empty-cells 0 1000 50
       #(draw-grid ((generate/drunkards-walk grid-width grid-height @num-empty-cells)
                     ::generate/grid))]])

   (when (= @selected-tab :automata)
     [:div.cellular-specific
