Browse Source

million game - added NUM_ROUND definition

main
fdlt3917 2 years ago
parent
commit
cf2cff970f
  1. 10
      src/main/quizproject.c
  2. 2
      src/main/quizproject.h

10
src/main/quizproject.c

@ -1236,12 +1236,12 @@ void play_milliongame() {
printf("\nPlaying who wants to be a millionaire...\n\n");
int million_i = 0, million_k = 0;;
char million_user_answers[round];
char million_std_answers[round] = {'B', 'C', 'D', 'C', 'B', 'D', 'B', 'A', 'B', 'B', 'A', 'D', 'C', 'C', 'B'};
char million_user_answers[NUM_ROUNDS];
char million_std_answers[NUM_ROUNDS] = {'B', 'C', 'D', 'C', 'B', 'D', 'B', 'A', 'B', 'B', 'A', 'D', 'C', 'C', 'B'};
int million_stay_in_game = 0, million_reward = 0, million_checkpoint = 0, million_count_replace = 0;
int million_lifeline_hint = 1, million_lifeline_delete = 1, million_lifeline_friend = 1;
char questions[round][256] = {
char questions[NUM_ROUNDS][256] = {
"What is the capital of France?",
"Which Disney character famously leaves a glass slipper behind at a royal ball?",
"What name is given to the revolving belt machinery in an airport that delivers checked luggage from the plane to baggage reclaim?",
@ -1258,7 +1258,7 @@ void play_milliongame() {
"Who is the only British politician to have held all four “Great Offices of State” at some point during their career?",
"In 1718, which pirate died in battle off the coast of what is now North Carolina?"
};
char answers[round][4][256] = {
char answers[NUM_ROUNDS][4][256] = {
{ "A) Berlin", "B) Paris", "C) London", "D) Rome" },
{ "A) Pocahontas", "B) Sleeping Beauty", "C) Cinderella", "D) Elsa" },
{ "A) Hangar", "B) Terminal", "C) Concourse", "D) Carousel" },
@ -1278,7 +1278,7 @@ void play_milliongame() {
million_instructions();
while(million_i < round && million_stay_in_game == 0){
while(million_i < NUM_ROUNDS && million_stay_in_game == 0){
printf("\nYou have %d:Fifty/Fifty\t%d:Phone a Friend\t%d:Hint\t\n",million_lifeline_delete,million_lifeline_friend,million_lifeline_hint);

2
src/main/quizproject.h

@ -97,7 +97,7 @@ void B_write_review(void);
#define NUM_QUESTIONS 5
#define round 15
#define NUM_ROUNDS 15
#define MAX_LIVES 10
#define MAX_WORD_LENGTH 20
#define ROCK 1

Loading…
Cancel
Save