center

Pygame – center text in moving rect

Pygame – center text in moving rect Question: i’m making a drop the number game in pygame and have squares which will fall from the top of the screen to the bottom whilst having a numeric value and that number being displayed on each square. I am struggling to get the text centered on the …

Total answers: 1

Python all points on circle given radius and center

Python all points on circle given radius and center Question: I wrote this function: def get_x_y_co(circles): xc = circles[0] #x-co of circle (center) yc = circles[1] #y-co of circle (center) r = circles[2] #radius of circle arr=[] for i in range(360): y = yc + r*math.cos(i) x = xc+ r*math.cos(i) x=int(x) y=int(y) #Create array with …

Total answers: 1