   [world-state]
   (merge world-state
          {:stats {:runs 0,
-                  :success 0}}))
+                  :success 0},
+          :length 0,
+          :lengths {:failure [],
+                    :success []}}))
 
 
 (defn toggle-button-text



(defn reset-to-initial
  [world-state]
  (merge (:initial world-state)
         {:stats (:stats world-state)}
         {:random? (:random? world-state)}
         {:initial (:initial world-state)}))


(defn handle-button-click

   vals
   (some true?)))



(defn successful-run
  [world-state]
  (let [inc-stats (partial merge-with + {:runs 1, :success 1})]
    (-> world-state
        reset-to-initial
        (update-in [:stats] inc-stats)
        (update-in [:lengths :success] conj (:length world-state))
        (assoc-in [:length] 0))))


(defn unsuccessful-run
  [world-state]
  (-> world-state
      reset-to-initial
      (update-in [:lengths :failure] conj (:length world-state))
      (assoc-in [:length] 0)
      (update-in [:stats :runs] inc)))

(defn move-randomly
