sc2simulator/scenarioMgr/scenario.py
def updateUnit(self, tag=0, techUnit=None, **attrs):
        """include more information to better represent the specified unit"""
        try: # lookup previously defined unit
            u = self.units[tag]
            u.update(**attrs) # assign attributes into unit
        except KeyError: # define a new unit
            u = self.addUnit(tag, newUnit=techUnit, **attrs)
            if u.owner and u.owner not in self.players: # ensure that this unit's owner is represented as a player
                self.addPlayer(u.owner)
        return u
include more information to better represent the specified unit
include more information to better represent the specified unit
include more information to better represent the specified unit
def updateUnit(self, tag=0, techUnit=None, **attrs):
        try: 
            u = self.units[tag]
            u.update(**attrs) 
        except KeyError: 
            u = self.addUnit(tag, newUnit=techUnit, **attrs)
            if u.owner and u.owner not in self.players: 
                self.addPlayer(u.owner)
        return u
def updateUnit ( self , tag = 0 , techUnit = None , ** attrs ) : try : u = self . units [ tag ] u . update ( ** attrs ) except KeyError : u = self . addUnit ( tag , newUnit = techUnit , ** attrs ) if u . owner and u . owner not in self . players : self . addPlayer ( u . owner ) return u
include more information to better represent the specified unit
include more information to better represent the specified unit
"""include more information to better represent the specified unit""" # lookup previously defined unit # assign attributes into unit # define a new unit # ensure that this unit's owner is represented as a player
self
tag
techUnit