     (doseq [y (reverse (range n-rows))]
       (<! (timeout 10))
       (swap! state assoc-in [:board y] (game-over-row)))))
-
-(declare go-go-gravity!)
-(declare stop-gravity!)
 
 (defn spawn-piece!
   "Spawns the given piece at the starting position."

                     nil)
                   (when (not @paused?)
                     (case (key-name e)
                       :down  (put! down-chan true)
                       :left  (try-move! -1 0)
                       :right (try-move!  1 0)
                       :space (hard-drop!)
                       :up    (try-rotate!)
                       nil))

(def music-playing?
  "Boolean flag signaling if the music is playing or not"
  (atom false))

;;------------------------------------------------------------------------------
;; Piece Control Throttling
;;------------------------------------------------------------------------------

; These channels can received boolean signals indicating on/off status.
; Duplicate signals are ignored with the (dedupe) transducer.
(def move-down-chan (chan 1 (dedupe)))

(defn go-go-control-soft-drop!
  "Monitor move-down-chan to update the gravity speed."
  []
  (go-loop []
    (let [[value c] (alts! [quit-chan move-down-chan])]
      (when (= c move-down-chan)
        (swap! state assoc :soft-drop value)
        (refresh-gravity!)
        (recur)))))

;;------------------------------------------------------------------------------
;; State Monitor
