Random non overlapping circles(with circle number controlled) in python and pygame
Create a list of circles Each circle is a tuple with 3 components, the x and y coordinate and the radius. Append new circles as long the length of the list is less than n: circle_list = [] while len(circle_list) < n: # […] Create a random position and radius: r = random.randint(10, 20) x … Read more