Question: c++ 1. Write a program which will play Rock, Paper, Scissors game with the user. When game starts, user will input, O for Rock 1
1. Write a program which will play "Rock, Paper, Scissors" game with the user. When game starts, user will input, O for Rock 1 for Paper 2 for Scissors. Rules for the game: 1. Paper wins over Rock. 2. Rock wins over Scissors. 3. Scissors wins over Paper. 4. If both computer and user pick the same move, it will be a draw and no new points will be given to any player. 5. If one player (computer or user) wins the round, 1 point will be given to winner. 6. The player who reaches to maximum score (can be defined inside the program), will win the game. Requirements: If user inputs an illegal value, program should warn and ask input again. Computer's move should be represented with enumeration which has name Move and constants as ROCK, PAPER and SCISSORS. Computer's move should be picked in a separate function which has a function prototype as enum Move getRandomMove (); Commands or methods which are not covered in the class up to this week will not be accepted or graded Sample flow of the game: ****** Welcome to Rock-Paper-Scissors Game ****** ### Rules: ### Press 1 for Rock ### Press 2 for Paper ### Press 3 for Scissors ### First one to reach 3 points will win. Input your move: 1 You picked Rock. Computer picked Scissors. You got 1 point(s). *** Score -> You: 1, Computer: 0 Input your move: 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
