-2
I'm trying to create the pong game with pygame but I'm stucked: I can't make the ball bounce. Here's the code:
First I drew the ball:
ball = pygame.draw.rect(window, (255,255,255), pygame.Rect(ballx,bally,30,30))
Than I tried to make it move and bounce (in the main loop)
# ball
ballx += 1
if ballx