             socketController.send clientSocket, obj
 
             #send all existing sprites to the new client
+            sprites = spriteList.getAll()
+            for id of sprites
+                sprite = spriteList.get id
+                obj =
+                    command: 'create'
+                    uid: sprite.getUid()
+                    id: sprite.getId()
+                    text: 'initially create other objects'
+                    x: sprite.getX()
+                    y: sprite.getY()
+                    team: sprite.getTeam()
+                socketController.send clientSocket, obj
+
+
     send: (clientSocket, data) ->
         msg = jsonController.makeResponse data, clientSocket.sessionId
         clientSocket.send msg
-        console.log ">>> sending #{msg}"
-
-    sendAll: (data) ->
+        console.log ">>> sending to uid: #{clientSocket.sessionId} #{msg}"
+
+    sendAll: (data, excludeUid) ->
         clients = clientList.getAll()
         #console.log clients
         for uid of clients
             client = clientList.get uid
-            socketController.send client.clientSocket, data
+            socketController.send client.clientSocket, data if not excludeId? or excludeId? and excludeUid isnt uid
             #console.log "client: #{client.clientSocket}"
 
 

            clientList.add clientSocket.sessionId, clientSocket

            clientSocket.on 'message', (data) ->
                console.log "<<< #{data}"
                obj = jsonController.getObject data
                action = obj.action
                uid = obj.uid
                client = clientList.get uid
                #console.log client if client?
                (client[action])(obj) if client?
                console.log "ran command: #{action}"
            clientSocket.on 'disconnect', ->
                clientList.remove clientSocket.sessionId
                console.log 'disconnecting'

        @table








class Clients extends Hash
    add: (uid, clientSocket) ->
        #console.log "adding client with uid: #{uid}"
        client = new Client uid, clientSocket
        super uid, client
    remove: (uid) ->
        #console.log "removing client with uid: #{uid}"

        #remove all units with this uid
        sprites = spriteList.getAll()
        for id of sprites
            sprite = spriteList.get id
            spriteList.remove id if sprite.getUid() is uid
        obj =
            uid: uid
            command: 'close'
            text: 'user dropped'
        client = clientList.get uid
        socketController.sendAll obj, uid
        super uid
    get: (uid) ->
        #console.log "getting client with uid: #{uid}"
        super uid
    getAll: ->
        #console.log "getting all clients"
        super()

clientList = new Clients










###
