           "Solved!"
           [:div
            (str "Suggested Moves: " (b/solve-next board))
-           [:div [:button {:on-click run-solver} "Run solver!"]]]))]
+           [:div [:button {:on-click #(async/put! command :solve)} "Run solver!"]]]))]
      [:p
       "© 2017 Charles L.G. Comstock "
       [:a {:href "https://github.com/dgtized/tile-game"} "(github)"]]]))

            :value size :min 2 :max 8
            :on-change (fn [e] (swap! app-state assoc :size (.-target.value e)))}]])

(defn render-tile [[x y] tile]
  (if-not (zero? tile)
    (let [fill-color (nth colors tile)]
      [:g {:key (str "tile-" tile) :on-click #(slide! tile)}
       [:rect {:x (+ x 0.05) :y (+ y 0.05) :width 0.9 :height 0.9 :fill fill-color}]
       [:text {:x (+ 0.5 x) :y (+ 0.65 y)
               :font-family "Verdana" :font-size 0.4 :text-anchor "middle"}
        (str tile)]])))

(defn tile-grid [run-solver]
  (let [{:keys [board size analysis-mode]} @app-state
        dim (b/dimension board)]
    [:center

     [:svg {:view-box (str "0 0 " dim " " dim) :width 800 :height 800}
      (for [x (range dim) y (range dim)]
        (let [tile (nth board (+ (* y dim) x))]
          (render-tile [x y] tile command)))]
     [:h4 (if (b/solved? board) "Solved!" "Slide tiles with arrow keys or clicking on tile")]
     (board-size-slider size)
     [:div
