         socketController.sendAll obj
         console.log "adding sprite with uid: #{@uid} and id: #{@id} in sprite constructor"
 
+    move: (data) ->
+        @x = data.x
+        @y = data.y
+
+    getId: ->
+        @id
+
+    getX: ->
+        @x
+
+    getY: ->
+        @y
+
 
 ###
 begin listening for websockets

        console.log "adding sprite with id: #{uid}"
        @index++
        sprite = new Sprite uid, @index
        super uid, sprite
    remove: (uid) ->
        console.log "removing sprite with id: #{uid}"
        super uid

        spriteList.add @uid
        console.log "adding sprite (in client.add)"

    move: (data)->
        sprite = spriteList.get data.id
        #console.log "sprite: #{sprite}"
        sprite.move data
        obj =
            uid: data.uid
            id: data.id
            x: sprite.getX()
            y: sprite.getY()
            command: 'move'
            text: 'moving'
        socketController.sendAll obj
        console.log "moving"


