 (ns cbfg.world.t1
   (:require-macros [cljs.core.async.macros :refer [go-loop]]
                    [cbfg.act :refer [act actx-top achan achan-buf aput atake]])
-  (:require [cljs.core.async :refer [<! >! close! chan timeout dropping-buffer]]
+  (:require [cljs.core.async :refer [<! >! close! chan map< merge timeout dropping-buffer]]
             [goog.dom :as gdom]
             [om.core :as om :include-macros true]
             [om.dom :as dom :include-macros true]
             [ago.core :refer [make-ago-world ago-chan ago-timeout]]
             [cbfg.vis :refer [listen-el get-el-value get-el-innerHTML]]
             [cbfg.net :refer [make-net]]
+            [cbfg.lane]
             [cbfg.world.net]
-            [cbfg.lane]))
+            [cbfg.world.lane]
+            [cbfg.world.base :refer [world-cmd-loop]]))
 
 ;; TODO: How to assign locations to world entities before rendering?
 

        (make-net world
                  (:net-listen-ch @prog-world)
                  (:net-connect-ch @prog-world))
        (let [prog (get-el-value "prog")
              prog-js (str "with (cbfg.world.t1) {" prog "}")
              prog-res (try (js/eval prog-js) (catch js/Object ex ex))]
          (println :prog-res prog-res)
          (<! prog-ch)
          (close! event-ch)
          (close! render-ch)
          (recur (inc num-worlds)))))))

                           ;   :net-listen-ch => ch
                           ;   :net-connect-ch => ch
                           ;   :servers => { server-addr => ports }
                           ;   :clients => { client-addr => client-info } }

(def run-history
  (atom {:snapshots {0 {}
