Browse Source

Stores and shows score for RockPprSciss

main
fdlt3859 2 years ago
parent
commit
a573824325
  1. 6
      src/main/quizproject.c

6
src/main/quizproject.c

@ -1814,11 +1814,13 @@ void v_play_rockpapersciss(){
{ {
printf("\nYou lose! I picked Paper\n\n"); printf("\nYou lose! I picked Paper\n\n");
computer_score++; computer_score++;
printf("You have %d/3 points and I have %d/3 points.\n\n",player_score, computer_score);
} }
else else
{ {
printf("\nYou win! I picked Scissors\n\n"); printf("\nYou win! I picked Scissors\n\n");
player_score++; player_score++;
printf("You have %d/3 points and I have %d/3 points.\n\n",player_score, computer_score);
} }
} }
else if (player_choice == PAPER) else if (player_choice == PAPER)
@ -1827,6 +1829,7 @@ void v_play_rockpapersciss(){
{ {
printf("\nYou win! I picked Rock\n\n"); printf("\nYou win! I picked Rock\n\n");
player_score++; player_score++;
printf("You have %d/3 points and I have %d/3 points.\n\n",player_score, computer_score);
} }
else if (computer_choice == PAPER) else if (computer_choice == PAPER)
{ {
@ -1836,6 +1839,7 @@ void v_play_rockpapersciss(){
{ {
printf("\nYou lose! I picked Scissors\n\n"); printf("\nYou lose! I picked Scissors\n\n");
computer_score++; computer_score++;
printf("You have %d/3 points and I have %d/3 points.\n\n",player_score, computer_score);
} }
} }
else if (player_choice == SCISSORS) else if (player_choice == SCISSORS)
@ -1844,11 +1848,13 @@ void v_play_rockpapersciss(){
{ {
printf("\nYou lose! I picked Rock\n\n"); printf("\nYou lose! I picked Rock\n\n");
computer_score++; computer_score++;
printf("You have %d/3 points and I have %d/3 points.\n\n",player_score, computer_score);
} }
else if (computer_choice == PAPER) else if (computer_choice == PAPER)
{ {
printf("\nYou win! I picked Paper\n\n"); printf("\nYou win! I picked Paper\n\n");
player_score++; player_score++;
printf("You have %d/3 points and I have %d/3 points.\n\n",player_score, computer_score);
} }
else else
{ {

Loading…
Cancel
Save