The very last step to completing our Space Invaders game is adding sound/music to our game.
First, we import our sound functions and initialize variables that hold our notes and music:
Next,
we insert the sounds at the various points in the program where they
make sense. Specifically, when we fire a missile, when the aliens
move and when an alien is hit by a missile.
Let's insert those code snippets into our full project, and we have a completed Space Invaders game!