Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help for RSP in C++ NO SPAM!! I will appreciate your help. Player1 Player2 Player3 Player4 Winner Player6 Player? Player8 two players compete by
Need help for RSP in C++
NO SPAM!! I will appreciate your help.
Player1 Player2 Player3 Player4 Winner Player6 Player? Player8 two players compete by choosing Rock, Paper or Scissors and the winner of the game is determined by comparing the choices of the players. Rock beats Scissors, Scissors beats Paper, Paper beats Rock. You are asked to modify these classes with the names provided in the following individual stages 1.Computer.cpp computer always chooses Rock (the base class for all computer players) New computer players: Create the following computer players making use of inher-itance 2.RandomComputer.cpp: RandomComputer returns a random move 3. Avalanche.cpp: Avalanche always chooses Rock 4.Bureaucrat.cpp: Bureaucrat always chooses Paper 5.Toolbox.cpp: Toolbox always chooses Scissors 6.Crescendo.cpp: Crescendo moves in the following order: Paper, Scissors, Rock 7 PaperDoll.cpp: Paper doll moves in the following order: Paper, Scissors, Scissors 8FistfullODollars.cpp: Fistfull?Dollars moves in the following order Rock, Paper, Paper 9.referee.cpp: your referee class should be able to match any two players together 10.Tournament.cpp: Create a class called Tournament. In Tournament.cpp there should be a driver function that sets eight players against each other. The bracket follows the illustration as follows 11 human.cpp input the 8 players from the keyborad In every round, the winner is determined after five plays (draws count as plays). That is, in every round, two players play against each other five times. The one who wins more advances. If both win the same number of plays, then the player with a lower index advances. (e.g. if Player2 and Player4 reach a tie after 5 plays, then Player2 advances.) Also, players "refresh their memories between rounds. That is, whenever Crescendo enters a round, it plays paper first. Your main.cpp file should have access to all your classes. The input consists of one line: a list of computer player names (from the above list, excluding RandomCom-puter), divided by space where the i-th name represents Player in the bracket. The output is the name of the grand winner Player1 Player2 Player3 Player4 Winner Player6 Player? Player8 two players compete by choosing Rock, Paper or Scissors and the winner of the game is determined by comparing the choices of the players. Rock beats Scissors, Scissors beats Paper, Paper beats Rock. You are asked to modify these classes with the names provided in the following individual stages 1.Computer.cpp computer always chooses Rock (the base class for all computer players) New computer players: Create the following computer players making use of inher-itance 2.RandomComputer.cpp: RandomComputer returns a random move 3. Avalanche.cpp: Avalanche always chooses Rock 4.Bureaucrat.cpp: Bureaucrat always chooses Paper 5.Toolbox.cpp: Toolbox always chooses Scissors 6.Crescendo.cpp: Crescendo moves in the following order: Paper, Scissors, Rock 7 PaperDoll.cpp: Paper doll moves in the following order: Paper, Scissors, Scissors 8FistfullODollars.cpp: Fistfull?Dollars moves in the following order Rock, Paper, Paper 9.referee.cpp: your referee class should be able to match any two players together 10.Tournament.cpp: Create a class called Tournament. In Tournament.cpp there should be a driver function that sets eight players against each other. The bracket follows the illustration as follows 11 human.cpp input the 8 players from the keyborad In every round, the winner is determined after five plays (draws count as plays). That is, in every round, two players play against each other five times. The one who wins more advances. If both win the same number of plays, then the player with a lower index advances. (e.g. if Player2 and Player4 reach a tie after 5 plays, then Player2 advances.) Also, players "refresh their memories between rounds. That is, whenever Crescendo enters a round, it plays paper first. Your main.cpp file should have access to all your classes. The input consists of one line: a list of computer player names (from the above list, excluding RandomCom-puter), divided by space where the i-th name represents Player in the bracket. The output is the name of the grand winnerStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started