   (go-loop []
     (let [speed (grav-speed (:level @state) (:soft-drop @state))
           time- (timeout speed)
-          quit (:quit-chan @state)
-          [_ c] (alts! [time- stop-grav quit])]
+          [_ c] (alts! [time- stop-grav quit-chan])]
       (when (= c time-)
         (apply-gravity!)
         (recur)))))

  (let [redraw-chan (make-redraw-chan)]
    (go
      (loop [board nil theme nil]
        (let [[_ c] (alts! [(:quit-chan @state) redraw-chan])]
          (if (= c redraw-chan)
            (let [new-board (drawable-board)
                  new-theme (:theme @state)

                 :soft-drop false

                 :quit false

                 :history []}))

; This channel is closed when we want to shutdown all go-blocks
; in order to exit the game.
; It must be initialized to a new channel on init.
(def quit-chan nil)

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