
Ross Sheppard High School
Computer Programming 20
Student Learning Guide
The Paper, Rocks, Scissors Program
| When you have finished this project, you will be able to: | |
| use the randomizer to load a graphic | |
| create a simple interactive game | |
| use the If . . . Then . . . ElseIf statement | |
| change properties within the program code | |
| use the GoTo statement | |
|
describe the following terms:
|

The Paper, Rock, Scissors Program
The Paper, Rock, Scissors program is an electronic representation of the game you may have played as a child. In
this case, however, you are programming a game to be played against the computer. The PRS game requires the user
to select a choice of Paper, Rock, or Scissors by pressing the appropriate button. The user's choice is displayed
on the program. When the Play button is pressed, Visual Basic randomly generates the computer's choice, which is
also displayed. Based on the two selections, Visual Basic determines whether it is a win, loss, or tie and displays
the appropriate message. In addition, there is a Clear button if the user wants to start over, as well as a Quit
button.
| Object | Property | Setting |
| Form | Name | frmPRS |
| Caption | The Paper, Rock, Scissors Program | |
| TextBox | Name | txtUserChoice |
| Font | MS Sans Serif Bold 18 | |
| Alignment | Center | |
| Text | Make it blank | |
| Multiline | True | |
| TextBox | Name | txtCompChoice |
| Font | MS Sans Serif Bold 18 | |
| Alignment | Center | |
| Text | Make it blank | |
| Multiline | True | |
| TextBox | Name | txtStatus |
| Font | MS Sans Serif Bold 18 | |
| Alignment | Center | |
| Text | Make it blank | |
| Multiline | True | |
| TextBox | Name | txtUserMem |
| Font | MS Sans Serif Bold 18 | |
| Alignment | Center | |
| Text | Make it blank | |
| Multiline | True | |
| Visible | False | |
| CommandButton | Name | btnPaper |
| Caption | Paper | |
| CommandButton | Name | btnRock |
| Caption | Rock | |
| CommandButton | Name | btnScissors |
| Caption | Scissors | |
| CommandButton | Name | btnPlay |
| Caption | Play | |
| CommandButton | Name | btnExit |
| Caption | Exit | |
| CommandButton | Name | btnClear |
| Caption | Clear | |
| PictureBox | Name | picPaper |
| Picture | paper.bmp | |
| PictureBox | Name | picRock |
| Picture | rock.bmp | |
| PictureBox | Name | picScissors |
| Picture | scissors.bmp | |
| PictureBox | Name | picUserPic |
| PictureBox | Name | picCompPic |







