the requirements for this assignment are to use enums and functions and an option to play again. im pretty confuse on exactly what I am doing wrong. also extremely new to programing
here what I got any help is great
using namespace std;
// enums
enum Option {rock = 'R', paper = 'P', scissors = 'S'};
//functions
void displayInstrutions ()
{
cout << "Lets play rock, paper, scissor against the computer" <<endl;
cout << "Rock beats scissors, scissors beats paper and paper beats rock" <<endl;
}
Some formatting & indentation would not hurt either
You should call srand ONE TIME ONLY, not every time you enter getCompMove. You are potentially reseeding the C random generator multiple times before time has a chance to tick to the next time interval, effectively resetting the random generator to the beginning of the same sequence.
L37. Shouldn't you return the move choice?
L41 - as stated above, this should be moved to the beginning of main().
getWinner() - there's no need to have an else statement after a return.
playAgain() - the function needs to return a value. Why is a function argument needed?
L112 - the returned value from the function is not used.
L113 - the returned value from the function is not used.
L117 - This needs to be called with 2 parameters - as per the function definition - and a terminating ; is needed.
L120 - This needs to be called as per its definition and a terminating ; is needed.