Negative lives in Chrome
rillig opened this issue · 1 comments
rillig commented
When I reload the PDF, it starts at 0 points and 3 lives.
After I clear the 20 bricks for the first time, I get a congratulations message, as expected. Then, 20 new bricks are placed, and I can play the next round.
When I have cleared the next 20 bricks, no message appears, my score is at 40 and I cannot get any more points.
Therefore I let the ball drop, and when my lives decrease to 0, I get a game over message. After that, the game continues, and my lives continue to decrease into negative numbers, which is unexpected.
I think it should be possible to either reset the score to 0 after each win, or alternatively check for score % 20 === 0
instead of score === 20
(just a guess at how the code looks like).