Game Development Reference
In-Depth Information
Topics Covered In This Chapter:
— How to play Hangman.
— ASCII art
— Designing our game by drawing a flow chart before programming.
In this chapter, we are going to make a Hangman game. This game is more complicated
than our previous game, but it is also much more fun. Because the game is advanced, we
should first carefully plan it out by creating a diagram called a flow chart (explained later).
In the next two chapters, we will actually write out the code for Hangman.
In case you've never played Hangman before, let's first learn the rules for Hangman.
How to Play "Hangman"
In case you don't know, Hangman is a game for two people that's usually played using
paper and pencil. One player thinks of a word, and then draws a blank on the page for each
letter in the word. Then the second player tries to guess letters that might be in the word. If
they guess correctly, the first player writes the letter in the blank. If they guess incorrectly,
the first player draws a single body part of the hanging man. If the second player can guess
all the letters in the word before the man has been completely drawn, they win. But if they
can't figure it out in time, the man is hanged and they lose the game!
Sample Run of "Hangman"
Here is an example of what the player might see when they run the Hangman program 89
Search WWH ::




Custom Search