    reader/read-string
    reset-edit
    reset-random
-   remember-initial-state
-   make-flips-matter))
+   make-flips-matter
+   reset-stats
+   remember-initial-state))
 
 (go
   (listen-on-slider-change)

  (merge state {:editing? false
                :selected nil}))

(defn toggle-button-text
  [buttid condition valid invalid]
  (dommy/set-text! (dommy.core/sel1 buttid)

         (:edges world-state))))


(defn any-target-flipped?
  [world-state]
  (->>
   [(:initial world-state) world-state]
   (map get-target-edges)
   (apply merge-with not=)
   vals
   (some true?)))


(defn move-randomly
  [world-state]
  (swap! ticker dec)
  (if (neg? @ticker)
    (do 
      (reset! ticker @interval)
      (if (any-target-flipped? world-state)
        (update-in (reset-to-initial world-state)
                   [:stats] (partial  merge-with + {:runs 1, :success 1}))
        (if-let [m (get-random-legal-move-name world-state)]
          (flip-update-edge m world-state)
          (update-in (reset-to-initial world-state)
                     [:stats :runs] inc)
          )))
    world-state))


