Browse Source

added rate function and header to epic game

main
fdlt3885 2 years ago
parent
commit
a10ec6de60
  1. 9
      src/main/quizproject.c
  2. 1
      src/main/quizproject.h

9
src/main/quizproject.c

@ -1352,6 +1352,14 @@ void B_saythankyou(void){
printf("Dear player,\nI just wanted to take a moment to thank you for playing my game.\n It means a lot to me that you took the time to experience what I created.\n Your support and feedback are greatly appreciated.\n I hope you had a blast playing and I look forward to hearing more about your experience.\n Thank you again for your support and I hope to see you in future games!\n Best regards.");
}
void rate(void){
int rate;
printf("What would you rate my game out of 10?\n");
scanf("%d", &rate);
printf("Thank you for your rating!\n");
printf("Your rating: %d/10\n", rate);
}
void b_epic_game() {
B_displayWelcomeMessage();
b_entertostart();
@ -1373,6 +1381,7 @@ void b_epic_game() {
total_score += B_round10();
printf("You scored %d out of 22.\n", total_score);
B_saythankyou();
rate();
}

1
src/main/quizproject.h

@ -65,6 +65,7 @@ int B_round8(void);
int B_round9(void);
int B_round10(void);
void B_saythankyou(void);
void rate(void);
#define NUM_QUESTIONS 5

Loading…
Cancel
Save