    :else "none"))
 
 (defn get-adjusted-hp [game]
-  (let [game-status (:game/status game)
+  (let [game-status (:game/status @game)
         is-starting (or (= game-status :pending-open)
                         (= game-status :pending-closed)
                         (= game-status :active-intermission))]

  (if (> hp 100) 100
      (if (neg? hp) 0 hp)))

(defn render-wombat-status [game stat]
  (let [{:keys [db/id
                wombat-name
                username
                score
                hp
                color]} stat
                adjusted-hp-value (if (nil? hp)
                                    (get-adjusted-hp game)
                                    (get-bounded-hp hp))
                is-dead (zero? adjusted-hp-value)
                health-color (get-health-color adjusted-hp-value)
                health-percent (str adjusted-hp-value "%")]
    ^{:key (or username id)}
    [:li.wombat-status {:class (when is-dead "disabled")}
     [:div.health-bar
      [:span.filling {:class health-color

                      {:width health-percent}}]]
     [:img.wombat-img {:src
                       (str "/images/wombat_" color "_right.png")}]
     [:div.wombat-name (:wombat/name wombat)]
     [:div.username (:user/github-username user)]
     [:div.score (:stats/score stats)]]))

(defn ranking-box
  [game]
  (let [players (:game/players @game)]
    [:div.game-ranking-box
     [:ul.list-wombat-status
      (doall (map #(render-wombat-status game (last %)) players))]]))
