            :evmsgs []}
           eventhandlers))
 
-(defn advance [{:keys [ruleset] :as router} msg]
+(defn advance [{:keys [unit ruleset] :as router} msg]
   "Takes a message, runs it against ruleset and returns a sequence of routed messages."
   (debug "routing starting with" (printable-msg msg))
   (if (< (::transition-count msg) 100)

               :cljs [cljs.core.async.impl.protocols :as ap])
            #?(:clj  [clojure.core.async :as a]
               :cljs [cljs.core.async :as a])
            [ow.starbuck.protocols :as p]
            #_[ow.starbuck.core :refer [defcomponentrecord] :as oc]
            ))

    (do (warn "dropping message due to high transition-count")
        [])))

(defn make-router [ruleset & {:keys [unit dispatch?]
                              :or {dispatch? true}}]
  {:unit unit
   :ruleset ruleset
   :dispatch? dispatch?})
