   (new-game! level)
   (beat timer level))
 
-(let [timer (goog.Timer.)
+(let [timer (Timer.)
       rounds (listen (chan) (dom/getElement "new-game") "click")]
   ((juxt handle-buttons handle-keystrokes #(handle-timer timer)))
   (go (while (<! rounds)

(ns ez-snake.core
  (:require-macros [cljs.core.async.macros :refer [go go-loop]])
  (:require [goog.dom :as dom]
            [goog.style :as style]
            [goog.events :as events]
            [goog.Timer :as timer]
            [goog.events.KeyHandler :as keyh]
            [cljs.core.async :refer [put! chan <! close!]]
            [ez-snake.game :refer [new-game! crawl! turn! game]]))

(defn listen [ch el type]
  (events/listen el type #(put! ch %))

    (.start)))

(defn key-handler [target]
  (KeyHandler. target))

(defn level []
  (.-value (dom/getElement "level")))
