I have a rect object called ball_rect
in my code this object has his ordinate decrease every second by 2, eventually it falls and reach the bottom of my screen and disappear. I want this object to not fall beyond 200 pixels in y axis.
I also knew a the command to do that but I forgot.
here's the code:
ball_y = 20
ball_x = 100
ball = pygame.image.load("data/ball.png")
ball_rect = ball.get_rect(topleft = (ball_x,ball_y)
def ball_area(): #here I want to put the code to restrict it in the margin of the screen