We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Destruction

Okay, so bullets are flying, but they don't do anything. Let's kill some asteroids!

There are three types of asteroids:

  1. Large
  2. Medium
  3. Small

When a large asteroid is destroyed, it should split into two medium asteroids. When a medium asteroid is destroyed, it should split into two small asteroids. When a small asteroid is destroyed, it should disappear.

For now, we'll just always make the asteroids disappear when they're destroyed. We'll handle splitting later.

Assignment

    1. The kill() method is a built-in feature of Pygame sprites. It removes the "killed" object from all its groups so that the engine stops updating and drawing it.

If everything looks right, run and submit the CLI tests.