You've just finished two hard projects back to back, and regardless of how much you have learned you deserve kudos for all your patience. This project required you to follow several long steps before you could see your code run. I hope it was worth it, and I hope in retrospect that you can see why all the code was needed.
Along the way, you've learned all about
UIBezierPath, custom enums, default method parameters, and more, so you're several steps closer to your goal of being an experienced Swift developer. Well done!
If you're looking to improve this project some more, and you're able to steer yourself away from the particle editor for a few minutes, why not have a go at removing the magic numbers in the
createEnemy() method. Instead, define them as constant properties of your class, giving them useful names. You could also try adding a new and fast-moving type of enemy that awards the player bonus points if they hit it.
You finished another project, and I'm glad Hacking with Swift helped you. Now I need your help. Please take just a moment out of your day to tell others about Hacking with Swift so they can benefit too.
You can click below to post a tweet straight to this project. Or if you're feeling particularly generous, you can click here to link to Hacking with Swift on your website and help spread the word.
Thank you. Your support is what keeps me going!
Paul Hudson is the creator of Hacking with Swift, the most comprehensive series of Swift books in the world. He's also the editor of Swift Developer News, the maintainer of the Swift Knowledge Base, and Mario Kart world champion. OK, so that last part isn't true. If you're curious you can learn more here.
Become a Swift expert
I wrote a book called Pro Swift that's dedicated to helping you master the Swift language, and it includes seven hours of video demonstrating each technique!