PROJECT PREVIEW: THE ROCK, PAPER AND SCISSORS GAME


This chapter's game project is the Rock, Paper and Scissors game, which you probably remember playing when you were a small child. The rules of the game haven't changed. Each player attempts to outplay an opponent (in this case, the computer) by consistently selecting superior choices. The rules for scoring the game are listed below.

  • Rock crushes scissors to win.

  • Paper covers rock to win.

  • Scissors cuts paper to win.

  • Everything else is a tie.

Figures 9.1 to 9.5 show examples of the Rock, Paper and Scissors game in action, showing its functionality and overall execution flow.

image from book
Figure 9.1: The Rock, Paper and Scissors game beings by displaying the game board.

image from book
Figure 9.2: When the player clicks on the Play button, a 1.5-second countdown begins.

image from book
Figure 9.3: The player gets a half-second at the end of the countdown to make a selection by choosing Rock, Paper, or Scissors.

image from book
Figure 9.4: As soon as both the computer and the player have made their choices, the game displays graphics showing each move and determines who won.

image from book
Figure 9.5: The Rock, Paper and Scissors game also keeps a running tally of the number of wins, losses, and ties.




Microsoft Visual Basic 2005 Express Edition Programming for the Absolute Beginner
Microsoft Visual Basic 2005 Express Edition Programming for the Absolute Beginner
ISBN: 1592008143
EAN: 2147483647
Year: 2006
Pages: 126

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