|
@ -2787,6 +2787,50 @@ void b_personality() { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//Guess the celebrity |
|
|
|
|
|
|
|
|
|
|
|
void b_celebrity(){ |
|
|
|
|
|
char name[20]; |
|
|
|
|
|
printf("Think of a celebrity and I will try to guess who it is.\n"); |
|
|
|
|
|
|
|
|
|
|
|
strcpy(celebrity, "Justin Bieber"); |
|
|
|
|
|
printf("Is it %s? (y/n)\n", celebrity); |
|
|
|
|
|
scanf(" %c", &answer); |
|
|
|
|
|
if (tolower(answer) == 'y') { |
|
|
|
|
|
printf("I got it! It's %s\n", celebrity); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
strcpy(celebrity, "Taylor Swift"); |
|
|
|
|
|
printf("Is it %s? (y/n)\n", celebrity); |
|
|
|
|
|
scanf(" %c", &answer); |
|
|
|
|
|
if (tolower(answer) == 'y') { |
|
|
|
|
|
printf("I got it! It's %s\n", celebrity); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
strcpy(celebrity, "Kanye West"); |
|
|
|
|
|
printf("Is it %s? (y/n)\n", celebrity); |
|
|
|
|
|
scanf(" %c", &answer); |
|
|
|
|
|
if (tolower(answer) == 'y') { |
|
|
|
|
|
printf("I got it! It's %s\n", celebrity); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
strcpy(celebrity, "Dwayne Johnson"); |
|
|
|
|
|
printf("Is it %s? (y/n)\n", celebrity); |
|
|
|
|
|
scanf(" %c", &answer); |
|
|
|
|
|
if (tolower(answer) == 'y') { |
|
|
|
|
|
printf("I got it! It's %s\n", celebrity); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
printf("I give up. Who were you thinking of?\n"); |
|
|
|
|
|
scanf("%s", name); |
|
|
|
|
|
printf("Ah, yes! %s is a great celebrity.\n", name); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void v_play_rockpapersciss(){ |
|
|
void v_play_rockpapersciss(){ |
|
|
int player_choice, computer_choice, player_score = 0, computer_score = 0; |
|
|
int player_choice, computer_choice, player_score = 0, computer_score = 0; |
|
|
srand(time(NULL)); |
|
|
srand(time(NULL)); |
|
@ -3382,7 +3426,7 @@ int main(int argc, char *argv[]) { |
|
|
|
|
|
|
|
|
int jump_to_menu = 0; |
|
|
int jump_to_menu = 0; |
|
|
|
|
|
|
|
|
while (choice != 23 || jump_to_menu) { |
|
|
|
|
|
|
|
|
while (choice != 24 || jump_to_menu) { |
|
|
printf("Welcome to the Game Menu!\n"); |
|
|
printf("Welcome to the Game Menu!\n"); |
|
|
printf("1. QuizGame\n"); |
|
|
printf("1. QuizGame\n"); |
|
|
printf("2. Fact or Lie?\n"); |
|
|
printf("2. Fact or Lie?\n"); |
|
@ -3406,7 +3450,8 @@ int main(int argc, char *argv[]) { |
|
|
printf("20. All About Space and the Universe!\n"); |
|
|
printf("20. All About Space and the Universe!\n"); |
|
|
printf("21. Brain whiz\n"); |
|
|
printf("21. Brain whiz\n"); |
|
|
printf("22. Personality Quiz!\n"); |
|
|
printf("22. Personality Quiz!\n"); |
|
|
printf("23. Exit\n"); |
|
|
|
|
|
|
|
|
printf("23. Guess the Celebrity!\n"); |
|
|
|
|
|
printf("24. Exit\n"); |
|
|
printf("Enter your choice: "); |
|
|
printf("Enter your choice: "); |
|
|
scanf("%d", &choice); |
|
|
scanf("%d", &choice); |
|
|
v_progress_bar(argc,argv); |
|
|
v_progress_bar(argc,argv); |
|
@ -3500,7 +3545,11 @@ int main(int argc, char *argv[]) { |
|
|
b_personality(); |
|
|
b_personality(); |
|
|
jump_to_menu = 1; |
|
|
jump_to_menu = 1; |
|
|
break; |
|
|
break; |
|
|
case 23: |
|
|
|
|
|
|
|
|
case 23: |
|
|
|
|
|
b_celebrity(); |
|
|
|
|
|
jump_to_menu = 1; |
|
|
|
|
|
break; |
|
|
|
|
|
case 24: |
|
|
printf("\nThank you for trying our C code!\n"); |
|
|
printf("\nThank you for trying our C code!\n"); |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|