

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: Asteroids
incomplete
2: Collisions
incomplete
3: Shooting
incomplete
4: Rate Limit
incomplete
5: Destruction
incomplete
6: Splitting
incomplete
7: Submit Your Repo
incomplete
This lesson's interactive features are locked, please to keep using them
Let's make things more interesting by allowing the player to shoot at the asteroids.
In our game, bullets:
Are small circles
Move at a constant speed in a straight line
Split up asteroids when they collide with them
Are spawned by player input (spacebar) and move in the direction the player is facing
It should inherit from CircleShape, similar to the Asteroid class.
Create an __init__ method that accepts x and y. It should call the parent class's __init__ method with x, y, and the SHOT_RADIUS.
Override its draw and update methods, just like you did in the Asteroid class.
It's expected that holding the spacebar will create a constant stream of bullets. We'll fix that soon.
It's expected that bullets pass through asteroids without any consequences. We'll fix that soon, too.
If everything looks right, run and submit the CLI tests.