This chapter will be your first real look at designing a complete game. It’s a short, simple game, but contains all the basic structural elements of game design that you’ll be returning to again and again. Input and output, decision making, keeping score, figuring out whether the player has won or lost, random numbers, and giving the player a chance to play again—it’s all here. You’ll also be taking a much closer look at variables and if statements and you’ll learn how to modularize your program by breaking down long segments of code into bite-sized methods. By the end of the chapter, you’ll have all the skills necessary to build complex logic games based on this simple model.
KeywordsGame Design Input Text Text Field Dynamic Text Event Handler
Unable to display preview. Download preview PDF.