I kind of spiked something. I apologize.
I had some time at the keyboard for a mostly boring video call, so I tapped in some code:
class Collider: def __init__(self, asteroids, missiles, saucers, saucer_missiles, ships): self.asteroids = asteroids self.missiles = missiles self.saucers = saucers self.saucer_missiles = saucer_missiles # <=== self.ships = ships self.score = 0 def check_collisions(self): self.check_individual_collisions(self.ships, self.asteroids) self.check_individual_collisions(self.asteroids, self.missiles) self.check_individual_collisions(self.ships, self.missiles) # following line added self.check_individual_collisions(self.saucer_missiles, self.ships) return self.score class Game: def process_collisions(self): collider = Collider( asteroids=self.asteroids, missiles=self.missiles, saucers=self.saucers, saucer_missiles=self.saucer_missiles, ships=self.ships) self.score += collider.check_collisions() if not self.ships: self.set_ship_timer(u.SHIP_EMERGENCE_TIME)
That turns out to mean that if I place the ship in front of where the saucer missiles appear (screen center, diagonally downward) the ship gets killed. So that works as intended.
Tests are green. Commit: Saucer missiles kill the ship.
That’ll do for now. See you anon.