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