CS 117, Introduction to Computer Science

Project 4: Rock, Paper, Scissors: due Wednesday 10/4/00

Overview

Computerized Rock, Paper, Scissors! Here is how the game is normally played:

Two players opposite each other, tap their fist in their open palm three times (saying Rock, Paper, Scissors) and then show one of three possible gestures.

               Rock, Paper, Scissors Hand Positions
 

Your Project

Write a program to judge the rock, paper, scissors. game. Each of two users types in either R, P, or S, and the program announces the winner as well as the basis for determining the winner:
Rock crushes scissors
Paper wraps rock
Scissors cuts paper
Be sure to allow the users to use lowercase as well as uppercase letters. Your program should include a loop that lets the user play again until the user is done.
 

Sample Program Run

Welcome to Rock, Paper, Scissors!
What does player 1 do? R
What does player 2 do? S

Player 1 wins! Rock crushes scissors.

Would you like to play again (Y/N)? y
What does player 1 do? p
What does player 2 do? S

Player 2 wins! Scissors cuts paper.

Would you like to play again (Y/N)? N

Thanks for playing!
 

(Graphic and some descriptions borrowed from http://www.rialto.k12.ca.us/frisbie/math/rps.html).