def next_position_ball(self, ball): try: ball = Ball(ball.position, ball.vitesse) ball.next(V2D()) except: ball = Ball(ball.ball.position, ball.ball.vitesse) ball.next(V2D()) return ball
def next_position_ball(self, ball): try: ballo = Ball(V2D(ball.position.x, ball.position.y), V2D(ball.vitesse.x, ball.vitesse.y)) ballo.next(V2D()) except: ballo = Ball(V2D(ball.ball.position.x, ball.ball.position.y), V2D(ball.ball.vitesse.x, ball.ball.vitesse.y)) ballo.next(V2D()) return ballo
def next_position_ball(self,ball): try: ballo=Ball(V2D(ball.position.x,ball.position.y),V2D(ball.vitesse.x,ball.vitesse.y)) ballo.next(V2D()) except: ballo=Ball(V2D(ball.ball.position.x,ball.ball.position.y),V2D(ball.ball.vitesse.x,ball.ball.vitesse.y)) ballo.next(V2D()) return ballo
def next_position_ball(self,ball): try: ball=Ball(ball.position,ball.vitesse) ball.next(V2D()) except: ball=Ball(ball.ball.position,ball.ball.vitesse) ball.next(V2D()) return ball
def babal(self,ball): br=Ball(ball) br.next(V2D()) return br
def reset_state(self, nb_players_1=0, nb_players_2=0): SoccerState.reset_state(self,nb_players_1,nb_players_2) self.ball = Ball.from_position(self.player(1,0).position.x,self.player(1,0).position.y) self.cur_score = 0
def babal(self, ball): br = Ball(ball) br.next(V2D()) return br