wall_top.draw(screen, WHITE) wall_bottom.draw(screen, WHITE) vertical_line.draw(screen, WHITE) #------------------ COLISOES ------------------------------------------------ ball.collide(player1_rect, player2_rect) #----------------- GERAR BOLA(QUANDO FAZ PONTO OU INICIA O JOGO) ------------ if (win == 0): if (ball.x > width): ball.x = width / 2 + (randint(20, 50)) ball.y = randint(90, 100) ball.speed_x *= -1 point_sound = pygame.mixer.Sound('sounds/pong_point.wav') point_sound.play() pp1 += 1 elif (ball.x < 0): ball.x = width / 2 ball.y = randint(90, 100) ball.speed_x *= -1 point = pygame.mixer.Sound('sounds/pong_point.wav') point.play() pp2 += 1 # ----------------- FINAL/PONTOS/GANHADOR --------------------------------------