Lecture notes for the Introduction to Computer Science I by James Tam | Return to the course web page |
Grade out of 24 | Letter |
53 - 54 | A+ |
51 - 52 | A |
48 - 50 | A- |
44 - 47 | B+ |
40 - 43 | B |
36 - 39 | B- |
32 - 35 | C+ |
28 - 31 | C |
24 - 27 | C- |
18 - 23 | D+ |
12 - 17 | D |
6 - 11 | D- |
0 - 5 | F |
This is a simple two player game where each player is allowed one of three possible hand gestures: rock, paper or scissors. Players are supposed to select their gesture at the same time and the gesture selected determines the outcome:
Player 1 | Player 2 | Outcome of the game |
Rock | Rock | Tie |
Rock | Paper | Paper covers rock (player 2 wins) |
Rock | Scissors | Rock blunts the scissors (player 1 wins) |
Paper | Rock | Paper covers rock (player 1 wins) |
Paper | Paper | Tie |
Paper | Scissors | Scissors cuts paper (player 2 wins) |
Scissors | Rock | Rock blunts the scissors (player 2 wins) |
Scissors | Paper | Scissors cuts paper (player 1 wins) |
Scissors | Scissors | Tie |
If a player tries to cheat (e.g., delays the selection of their gesture) then that player has committed a foul and is given a "forced rock" for their gesture regardless of the gesture selected. You can go the following url to try a web based version of the game: http://www.playrps.com/.
Version with two people playing the game | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Versions that include a computer-controlled opponent: In all the versions below the program will prompt the player to enter in the number of players (0, 1, 2). If another value is entered then the game will default to two computer players. | |
|
|
|
To help make sure that you haven't missed anything here is a checklist of items to be used in marking. A sample executable 'rps' can be found in UNIX under the directory: /home/231/tamj/assignments/assignment4.