Files
project_game/circle_spawner.py
juddin2 8769519960 I made sure my circles are falling continously and as the player doges the score increases.
I'm proud of making the circles fall from the top one at a time.
I was stuck on making the circle fall.
2025-12-04 21:14:43 -05:00

18 lines
485 B
Python

from random import randint
from circle import Circle
class CircleSpawner:
display = False
def play_turn(self, game):
width, height = game.board_size
game.state['score'] += 1
if self.should_spawn_circle(game.turn_number):
x= randint(0, width - 1)
new_circle= Circle((x,0))
game.add_agent(new_circle)
def should_spawn_circle(self, turn_number):
return randint(0, 200) < turn_number