def __init__(self, team, ball): self.ball = ball self.team = team self.posX = self.relX(5, self.team.isDefendingLeft) self.posY = FIELD_WIDTH/2 self.waitTime = STRAT_GOALIE_WAIT AbstractPlayer.__init__(self, COLOR_ORANGE, self.posX, self.posY, GRAPH_PLAYER_SIZE)
def __init__(self, playerRole, team, ball, posX, posY): """ playerRole is a tuple (giving the percent position) """ AbstractPlayer.__init__(self, team.color, posX, posY, GRAPH_PLAYER_SIZE) self.homePosition = HomePosition(playerRole, team, ball) self.playerRole = playerRole self.team = team self.ball = ball
def update(self, grandObserver): self.makeAction(grandObserver) AbstractPlayer.update(self)
def update(self, grandObserver): """ This nethod is called by matchturn using existing pygame.sprite implementation""" self.homePosition.update() self.makeAction(grandObserver) AbstractPlayer.update(self)