 
 
 
+
+
+
+
+
+
+
+
+
 ###
 client class for storing client info
 ###
 class Client
     constructor: (@uid, @clientSocket) ->
+        @team = if @uid % 2 == 0 then 'light' else 'dark'
+
+    getTeam: ->
+        @team
 
     add: ->
         spriteList.add @uid

            socketController.send clientSocket, obj

            #send all existing sprites to the new client
    send: (clientSocket, data) ->
        msg = jsonController.makeResponse data, clientSocket.sessionId
        clientSocket.send msg
        console.log ">>> sending #{msg}"

    sendAll: (data) ->
        clients = clientList.getAll()
        #console.log clients
        for uid of clients
            client = clientList.get uid
            socketController.send client.clientSocket, data
            #console.log "client: #{client.clientSocket}"




    getId: ->
        @id
    getX: ->
        @x
    getY: ->
        @y
    getUid: ->
        @uid
    getTeam: ->
        @team








###
