I have this program where I want to make this shape randomly appear and remain within this area 11 times. I've managed to make the shape randomly appear in this area 11 times, but I'm struggling to find a way for the shapes to remain. The circles appear and then disappear right away.
count = 0
while running:
num_flowers = 11
while count <= num_flowers:
flowers_x = random.randrange(640)
flowers_y = random.randrange(350, 470)
pygame.draw.circle(screen, (255, 255, 255), (x + flowers_x, y + flowers_y), 5)
count += 1
Aucun commentaire:
Enregistrer un commentaire