Choice get_Computer_choice(){
int n = rand() % 3 ;
return ch[n];
}
void decide_winner(){
// determine the winner , print the message, update the counts
}
string get_msg(Choice winner) {
if ( winner == ROCK)
return string("Rock smashes Scissors... ") ;
else if (winner == PAPER )
return string("Paper covers Rock ...") ;
else return string("Scissors cuts Paper...");
}
void summary() {
// print the game summary
}
//I need some help with this coding assignment...any suggestions?
This is what the output should look like:
Enter R for Rock, P for Paper , S for Scissor or E for Exit:P
You chose Paper ,
I chose Rock ,
Paper covers Rock ...YOU WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: p
You chose Paper ,
I chose Rock ,
Paper covers Rock ...YOU WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: p
You chose Paper ,
I chose Rock ,
Paper covers Rock ...YOU WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: r
You chose Rock ,
I chose Paper ,
Paper covers Rock ...I WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: r
You chose Rock ,
I chose Scissors ,
Rock smashes Scissors... YOU WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: r
You chose Rock ,
I chose Paper ,
Paper covers Rock ...I WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: s
You chose Scissors ,
I chose Rock ,
Rock smashes Scissors... I WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: s
You chose Scissors ,
I chose Scissors ,
Result is a tie.
Enter R for Rock, P for Paper , S for Scissor or E for Exit:s
You chose Scissors ,
I chose Scissors ,
Result is a tie.
Enter R for Rock, P for Paper , S for Scissor or E for Exit: r
You chose Rock ,
I chose Paper ,
Paper covers Rock ...I WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: s
You chose Scissors ,
I chose Paper ,
Scissors cuts Paper...YOU WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: p
You chose Paper ,
I chose Rock ,
Paper covers Rock ...YOU WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: p
You chose Paper ,
I chose Scissors ,
Scissors cuts Paper...I WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: r
You chose Rock ,
I chose Paper ,
Paper covers Rock ...I WIN!!
Enter R for Rock, P for Paper , S for Scissor or E for Exit: s
You chose Scissors ,
I chose Scissors ,
Result is a tie.
Enter R for Rock, P for Paper , S for Scissor or E for Exit: e
Total number of games played : 15
Number of games you win : 6
Number of games I win : 6
Number of tie games : 3