Once it drops to zero or below, the loop finishes and we'll display the game over message.
If, at the outset, the alien count isn't greater than zero then the loop won't get executed even once, and the program will go straight to displaying the game over message, without ever once having updated the canvas or showing the score.
That's just how while-loops work. But sometimes that can be a bit inconvenient and awkward.
|
|