Game Development Reference
In-Depth Information
Now let's think about what happens when we play Hangman. First, one player (the
computer in this case) thinks of a secret word. Then the second player (the person running
the program) will guess letters. Let's add boxes for these events, as shown in Figure 8-3.
(The boxes that are new to each flow chart have a dashed outline around them.) The arrows
show the order that the program should move. That is, first the program should come up
with a secret word, and after that it should ask the player to guess a letter.
Figure 8-3: Draw out the first two steps of Hangman as boxes with descriptions.
But the game doesn't end after the player guesses one letter. It needs to check to see if
that letter is in the secret word or not.
Search WWH ::




Custom Search