Adding additional scenes
Our game still feels rough around the edges. Our first order of business is to add more scenes, which should make the game feel more rounded, especially when starting the game and when the game is over.
The game over scene
Currently, the game over mechanism is a bit too minimalistic. While the player can lose and win the game, they can't restart the game once it is over. The player needs to shut down the application and open it again.
This is counterintuitive as the default behavior of iOS apps is to freeze the app instead of shutting it down. So in the worst case, our game with the Game Over message stays in the memory until the device is rebooted or the user kills the application from the app switcher.
Creating the game over scene
As our first task, we are going to decouple the game over logic and move it into a separate scene. Our game over scene should show whether the game was won or lost.