Question: To program a regular RPS game, you can follow these steps: 1 . User s choice: Prompt the user to choose rock, paper, or scissors.
To program a regular RPS game, you can follow these steps:
Users choice: Prompt the user to choose rock, paper, or scissors. You can
assume for rock, for paper, and for scissors.
Take user input.
Computers choice: Randomly generate a or to represent the
computers choice.
Check game result: users choice vs computers choice
Use an IFELSEIFELSEIFELSE branch to determine:
A tie
Computer win
User win
Invalid user input not or this is considered a computer win.
List every possible condition in each branch. Be careful about the data types
Eg if Computers choice is && users choice is both choices are both
choices are it is a tie.
The conditions for user win
The conditions for computer win
Program Requirements RPS Game
Each match can have or RPS games no other
numbers
At the beginning of your program, ask the users to determine
the number of games for this match.
Each game is a regular RPS game.
Keep track of the number of wins for the computer and user so
that we can determine who the final winner is
Program Requirements The Match
Announce the final winner after all games are played. In this
case, display something like Out of games, the computer
won You win!
Sometimes, we do not need to play all games.
For example: In a game match best of when one side
wins the first and second games, there is no reason to play the
third game. Stop the match if additional games no longer
matter. Inform the user with a different message, something
like The computer has already won out of games and is
automatically declared the winner!
Program Requirements Final Winner
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
