PROJECT PREVIEW: THE HANGMAN GAME


In this chapter's project, you will use the knowledge you gain of functions to develop the Hangman game. Figures 8.1 to 8.7 show examples from the Hangman game, demonstrating its functionality and overall execution flow.

image from book
Figure 8.1: When the game is started, it displays a graphic showing an empty hangman's gallows and a series of underscore characters representing the secret word.

image from book
Figure 8.2: As the game progresses, each correct guess is displayed at the top of the window, and a visual record of every letter guessed is displayed at the bottom of the window.

image from book
Figure 8.3: The game prevents the player from making the same letter guess more than once.

image from book
Figure 8.4: The game permits the player to enter only one letter at a time.

image from book
Figure 8.5: The game prevents the player from entering numeric input.

image from book
Figure 8.6: The game congratulates the player when he correctly guesses the secret word.

image from book
Figure 8.7: If the player fails to guess the secret word within six guesses, he loses the game, and the picture of the hangman's gallows is updated to show a full hangman image.

By the time you have finished developing this application, you will have gained a good understanding of how to create custom functions and how to use them to improve the overall organization and maintenance of your Visual C++ applications.




Microsoft Visual C++ 2005 Express Edition Programming for the Absolute Beginner 2006
Microsoft Visual C++ 2005 Express Edition Programming for the Absolute Beginner 2006
ISBN: 735615381
EAN: N/A
Year: 2005
Pages: 131

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net