    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 [: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

  [world-state]
  (merge world-state
         {:stats {:runs 0,
                  :success 0}}))


(defn toggle-button-text

      (if (any-target-flipped? world-state)
        (successful-run world-state)
        (if-let [m (get-random-legal-move-name world-state)]
          (flip-update-edge m
                            (update-in world-state [:length] inc))
          (unsuccessful-run world-state))))
    world-state))

