How very easy to Use Function in our game. If you want to write game I would advise you to use function. Function is very useful because you can use it over and over for Player death, Alien or you can generate sprites, and many things. This is small demo but, see how powerful it is to use functions
With function I am creating spaceship sprites, pickups, even collisions and so forth
Good luck