 ###
 class Hash
     constructor: ->
-        @table = []
+        @table = {}
 
     add: (id, obj) ->
         @table[id] = obj



class Instances extends Hash
    constructor: ->
        @clientList = new Clients
        @spriteList = new Sprites
        super()
    add: (sessionId, clientSocket) ->
        id = new Date().getTime()
        console.log "adding instance with uid: #{id}"
        instance = new Instance id
        console.log "adding instance: #{instance}"
        super id, instance
        @clientList.add sessionId, clientSocket
        @id = id
    remove: (uid) ->
        #console.log "removing instance with uid: #{uid}"

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