Python Asteroids on GitHub

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(
        self.score += collider.check_collisions()
        if not self.ships:

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.