def createPlayer(self, player_id,team): '''add a player to the given team''' player = Player() player.team = team playerId = id(player) player.player_id = player_id self.players[playerId] = player return player
def createPlayer(self, player_id,team): '''add a player to the given team''' player = Player() player.team = team playerId = id(player) player.player_id = player_id #player.player_id = Environment.NEXT_PLAYER_ID #Environment.NEXT_PLAYER_ID = Environment.NEXT_PLAYER_ID + 1 self.players[playerId] = player return player
def createPlayer(self, team): player = Player() player.team = team # I have no idea if this is being set somewhere else #if self.team == None: # self.team = team playerId = id(player) player.player_id = Environment.NEXT_PLAYER_ID Environment.NEXT_PLAYER_ID = Environment.NEXT_PLAYER_ID + 1 self.players[playerId] = player for o in self.observers: o.callRemote('createPlayer', playerId, player) #player.sounds = self.sounds return player