Question: You are given the method that simulates a rock,paper, scissors game move and a method to determine which player wins. Now, write in main the

You are given the method that simulates a rock,paper, scissors game move and a method to determine which player wins.
Now, write in main the logic to let a human play against the computer. The program prompts the user to choose a move. The program randomly pick a move for the computer. The program then checks to see who is the winner. It prints the winner. If no one wins, it goes to the next round and repeat until one player wins.
Sample run 1: human wins
Human against computer.
Your move (rock,paper,scissors): rock
Computer's move: scissors
You win.
Sample run 2: computer wins.
Human against computer.
Your move (rock,paper,scissors): rock
Computer's move: paper
Computer wins.
Sample run 3: many rounds, but computer wins.
Human against computer.
Your move (rock,paper,scissors): rock
Computer's move: rock
No one wins. Another round.
Your move (rock,paper,scissors): rock
Computer's move: rock
No one wins. Another round.
Your move (rock,paper,scissors): paper
Computer's move: scissors
Computer wins.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!