def reset_game(self): """Initialise start of game state (reset ship position, score, and asteroids).""" self.ship.reset() Asteroid.initiate_game() self.death = False self.spawn_speed = constants.INITIAL_SPAWN_FREQUENCY self.next_spawn = pyxel.frame_count + self.spawn_speed
def reset_game(self): """Initialise start of game state (reset ship position, score, and asteroids).""" # send connection message to game lettin em know we out here self.child_con.send("reset") self.ship.reset() Asteroid.initiate_game() self.death = False self.spawn_speed = constants.INITIAL_SPAWN_FREQUENCY self.next_spawn = pyxel.frame_count + self.spawn_speed