 
                   :score 0}))
 
+; required for pausing/resuming the gravity routine
+(def pause-grav (chan))
+(def resume-grav (chan))
+
 ;;------------------------------------------------------------
 ;; STATE MONITOR
 ;;------------------------------------------------------------

  (size-canvas!)
  (try-spawn-piece!)
  (add-key-events)
  (go-go-gravity!)
  (go-go-draw!)

  (repl/connect)
  (connect-socket!)

  "Spawns the given piece at the starting position."
  [piece]
    (swap! state assoc :piece piece
                       :position start-position)
    (put! resume-grav 0))

(defn try-spawn-piece!
  "Checks if new piece can be written to starting position."
