   (let [stage (:stage @displayed-renderstate)
         tilemap (createeaseljscontainer "tilemap" 100 100)
         characters (createeaseljscontainer "characters" 100 100)
-        leftRoster (createcharacterroster "leftRoster" 0 100)
-        rightRoster (createcharacterroster "rightRoster" 500 100)]
+        leftRoster (createcharacterroster "team1Roster" 0 100)
+        rightRoster (createcharacterroster "team2Roster" 500 100)
+        rostermap {1 leftRoster 2 rightRoster}]
     (.removeAllChildren stage)
     (.addChild stage tilemap)
     (.addChild stage characters)

    ;; embed direct references to the map and character containers for
    ;; easy manipulation later
    (swap! displayed-renderstate assoc :stage-map tilemap :stage-characters characters)
    (swap! displayed-renderstate assoc :leftRoster leftRoster :rightRoster rightRoster)))

(defn initializerenderer [canvasname]
  (let [canvas (dom/get-element canvasname)

;; left/right GUI functions
;;

(defn- displaycharacterrostersprite [roster character x y]
  )

(defn rebuildrosterdisplaylist [gamestate rosterteam]
  (let [roster (get (:rostermap @displayed-renderstate) rosterteam)
        allcharacters (vals (:characters gamestate))
        teamcharacters (filter #(= (:team %1) rosterteam) allcharacters)
        orderedteamcharacters (sort-by :uniqueid teamcharacters)
        rostersize (count teamcharacters)]
    (.removeAllChildren roster)
    (syncsprites! :team1rostersprites allcharacters)
    (let [renderstate @displayed-renderstate
          rostersprites (:team1rostersprites renderstate)]
      (doseq [characterindex (range rostersize)
              character (get orderedteamcharacters characterindex)
              drawx 0
              drawy (* tilespacing characterindex)]
        (displaycharacterrostersprite roster character drawx drawy)))))


;;
;; initialization functions
