                  (dom/div nil 
                           (dom/button 
                             #js {:onClick (partial toggle-play-state app)}
-                            (if (:playing? app) "stop" "play")))
+                            (if (:playing? app) "stop" "play"))
+                          (dom/button
+                            #js {:onClick #(reset-random!)}
+                            "random"))
                  (apply dom/svg #js {:height (* height cell-size) 
                                      :width (* width cell-size)
                                      :onClick (partial handle-world-click 

            [om.dom :as dom :include-macros true]
            [cljs.core.async :refer (timeout <!)])
  (:require-macros [cljs.core.async.macros :refer (go)]))

(defn neighbors
  "Given a set of cells returns a seq of adjacent cells. If n cells share a 

                      (disj cells cell)
                      (conj cells cell))))))
                  
(defn random-cells
  [[width height]]
  (set (filter #(> (Math/random) 0.5) 
               (for [x (range 0 width) 
                     y (range 0 width)] 
                 (vector x y)))))

(defonce app-state (atom {:cells #{} 
                          :bounds [50 20]
                          :playing? false 
                          :cell-size 20
                          :speed 5}))

(defn reset-random!
  []
  (swap! app-state (fn [{b :bounds :as s}] (assoc s :cells (random-cells b))))) 

(defn world
  [app owner]
