Question: 1. In the game Rock Paper Scissors, two players simultaneously choose one of three options: rock, paper, or scissors. If both players choose the same

1. In the game Rock Paper Scissors, two players simultaneously choose one of three options: rock, paper, or scissors. If both players choose the same option, then the result is a tie .However, if they choose differently, the winner is determined as follows:

Rock beats scissors, because a rock can break a pair of scissors.

Scissors beats paper, because scissors can cut paper.

Paper beats rock, because a piece of paper can cover a rock.

Create a game in which the computer randomly chooses rock, paper, or scissors. Let the user enter a number 1, 2, or 3, each representing one of the three choices. Then, determine the winner.

Create a method that sets each players choice. Store the choices within a global array. Player 1 ins in index 0, Player 2 index 1

Create a method the is executed for the turn to determine who is the winner. Return the winning player name as a return type to the main method

Display the winner to the console in the main method

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!