         (let [[value c] (alts! [(:quit-chan @state) uc])]
           (when (= c uc)
             (swap! state assoc :soft-drop value)
-
-            ; force gravity to reset
-            (put! pause-grav 0)
-            (put! resume-grav 0)
+            (refresh-gravity!)
             (recur)))))
 
     ; Remove key events when quitting

  "Restores the state of the board pre-pausing, and resumes gravity"
  []
  (reset! state @paused-board)
  (put! resume-grav 0)
  (reset! paused? false)
  (reset! music-playing? @paused-music))


                 :history []}))

; required for pausing/resuming the gravity routine
(def stop-grav (chan))

(def battle
  "Boolean flag signaling whether we are in solo or battle mode."
