 (defn show-top-panel
   [scores player]
   [:div.scores
-   [top-panel-button #(reset! app-state (new-game)) (special-char "&#x21bb;")]
+   [top-panel-button #(put! (:game-events game-loop) :new-game) (special-char "&#x21bb;")]
    (show-scores scores player)
    [top-panel-button #(swap! app-state update :help not) "?"]])
 


(defn- apply-move
  [game {:keys [winner looser taken] :as move}]
  {:pre [(move? move)]} 
  (-> game
    (assoc :board (reduce #(assoc-in %1 %2 winner) (:board game) taken))
    (update-in [:scores winner] + (count taken))

(defn take-empty-cell-move
  "Create a move to take an empty cell" 
  [player point]
  {:move point
   :winner player
   :looser :empty
   :taken [point]})

