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.
SPONSOR Tired of wasting time debugging your Swift app? Instabug’s SDK is here to help you minimize your debugging time by providing you with complete device details, network logs, and reproduction steps with every bug report. All data is attached automatically. It only takes a line of code to setup. Get started for free.
One of the most effective motivators of success is sharing your progress with other people – when you tell folks what you're doing and what you've learned, it encourages you to come back for more, which in turn will help you reach your app development goals faster.
So, now that you've done all the hard work it's time to share your success: tell folks that you've completed this project, either by clicking the button below to start composing a tweet, or by writing your own message from scratch. This will definitely encourage you to keep learning, but it will also help other folks discover my work – thank you!
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.