           (= mode :game) maybe-game-over))
 
 (.addEventListener js/document "keydown" #(swap! game-state handle-key-press (.-keyCode %)) false)
-(render-loop)
+(render-loop @game-state)
 (go-loop [_ nil]
   (swap! game-state run-game-cycle)
   (recur (<! (timeout (<! time-flow)))))


(def time-flow (chan))

(def game-state (atom {:rows (sorted-map)
                       :tetrimino nil
                       :next-tetrimino (random-tetrimino)
                       :gravity-interval 500

(def screen-height 440)
(def blocks-h 10)
(def blocks-v 24)
(def fps 30)
(def game-loop-freq 30)
(def render-freq (/ 1000 30))
(def block-size (/ screen-width blocks-h))
(def block-border-size 1)
(def rendering-offset [0 -2])
