             y: sprite.getY()
             command: 'move'
             text: 'moving'
-        socketController.sendAll obj
-        console.log "moving"
 
     fire: (data)->
+        console.log "firing"
         obj =
             uid: data.uid
             id: data.id
             eid: data.eid
             command: 'fire'
             text: 'firing'
-        socketController.sendAll obj
-        console.log "firing"
 
 
 

            command: 'close'
            text: 'instance closed'
        client = @clientList.get uid
        #socketController.sendAll obj, uid
        super uid
    get: (uid) ->
        #console.log "getting instances with id: #{id}"

    constructor: ->
        @masterSocket = io.listen server
        @instanceList = new Instances


        #hack to get instance initialized
        instanceId = @instanceList.add()
        instance = @instanceList.get instanceId

        @masterSocket.on 'connection', (clientSocket) =>
            #console.log clientSocket



            client = instance.clientList.add clientSocket.sessionId, clientSocket

            #send init function to this client to initialize interface
            data =
                command:'init'
                uid:clientSocket.sessionId
                text: 'initializing new client'
            client.send data

            #send all existing sprites to the new client
            sprites = instance.spriteList.getAll()
            for id of sprites
                sprite = instance.spriteList.get id
                data =
                    command: 'create'
                    uid: sprite.getUid()
                    id: sprite.getId()
