I'm trying to make a pong game in pygame, but I can't figure out how to put a ball circle, which I can create with
pygame.draw.circle into a
pygame.Rect object so i can use the colliderect function to manipulate the ball's position.
For example, a rectangle, I can do something like this:
rect = pygame.Rect(255, 255, 100, 100) pygame.draw.rect(screen, yellow, rect)
When I change the
pygame.Rect object position, the drawing primitives position also changes.
How can the same effect be achieved when I want to draw a circle, instead of a rectangle?