sc2simulator/scenarioMgr/scenario.py
def addPlayer(self, idx, loc=None, race=None):
        """add a definition for a player within a Scenario"""
        idx = int(idx) # ensure value is an integer
        if idx in self.players:
            print("WARNING: attempted to add already existing player %d: %s"%(
                idx, self.players[idx]))
            return self.players[idx]
        upgradeList = []
        self.upgrades[idx] = upgradeList
        p = ScenarioPlayer(idx, self.units, upgradeList, pos=loc, race=race)
        self.players[idx] = p
add a definition for a player within a Scenario
add a definition for a player within a Scenario
add a definition for a player within a Scenario
def addPlayer(self, idx, loc=None, race=None):
        idx = int(idx) 
        if idx in self.players:
            print("WARNING: attempted to add already existing player %d: %s"%(
                idx, self.players[idx]))
            return self.players[idx]
        upgradeList = []
        self.upgrades[idx] = upgradeList
        p = ScenarioPlayer(idx, self.units, upgradeList, pos=loc, race=race)
        self.players[idx] = p
def addPlayer ( self , idx , loc = None , race = None ) : idx = int ( idx ) if idx in self . players : print ( "WARNING: attempted to add already existing player %d: %s" % ( idx , self . players [ idx ] ) ) return self . players [ idx ] upgradeList = [ ] self . upgrades [ idx ] = upgradeList p = ScenarioPlayer ( idx , self . units , upgradeList , pos = loc , race = race ) self . players [ idx ] = p
add a definition for a player within a Scenario
add a definition for a player within a Scenario
"""add a definition for a player within a Scenario""" # ensure value is an integer
self
idx
loc
race