2014 | OriginalPaper | Chapter
10. Limited Lives
Published in:
Building JavaScript Games
Abstract
In this chapter, you make the Painter game more interesting by giving the player a limited number of lives. If players miss too many paint cans, they die. The chapter discusses how to deal with that and how to display the current number of lives to the player. In order to do the latter, you learn about a few programming constructs for repeating a group of instructions several times.