 
 (defn end-page []
   [:div [:h2 "The End"]
+   [:div (str "score:" (:score @app-state))]
    [:div [:a {:href "#/about"} "go to the home page"]]])
 
 (defn current-page []

  (every? #(or (= :failed %) (= :ok %)) (:status @app-state)))

(defn end-game []
  (init-state!)
  (secretary/dispatch! "/end")) 

(defn handle-letter [letter-id status]
  (do
    (change-letter-status letter-id status)
    (jump-next-letter)
    (if (end-game?)
      (end-game)

(def highlight-letter-width "5")


(def starting-state {:pos 0
                     :score 0
                     :status (vec (take num-letters (repeat :init)))})

(def app-state (atom starting-state))


(defn reset-state! []
  (reset! app-state starting-state))


;; -------------------------
