 
 (defn is-legal?
   [world-state move]
-  (if (:flips-matter? world-state)
-    (and
-     (ok-to-flip? world-state (second move))
-     (pos? (last (second move))))
-    (ok-to-flip? world-state (second move)))) 
+  (and
+   (ok-to-flip? world-state move)
+   (if (:flips-matter? world-state)
+     (pos? (last move))
+     true)
+   )) 
 
 
 (defn get-legal-moves
   [world-state]
   (filter
-   (partial is-legal? world-state)
+   (comp (partial is-legal? world-state) second)
    (world-state :edges)))
 
 (defn get-random-legal-move-name

(defn make-flips-matter
  [world-state]
  (merge world-state
         {:flips-matter? false}))


(defn parse-state

                      "go auto")
  (update-in world-state [:random?] not))


(defn toggle-flips
  [world-state]
  (toggle-button-text :#flips
                      (:flips-matter? world-state)
                      "flips matter"
                      "flips do not matter")
  (update-in world-state [:flips-matter?] not))

(defn handle-playing [clicked-what world-state]
  (let [clicked-edge? (re-matches #"edge.*" clicked-what)]
    (if clicked-edge?
