Browse Source

million game - added checkpoint system of reward

main
fdlt3917 2 years ago
parent
commit
18e394ceea
  1. 47
      src/main/quizproject.c

47
src/main/quizproject.c

@ -660,7 +660,7 @@ void play_milliongame() {
int million_i = 0, million_k = 0;;
char million_user_answers[round];
char million_std_answers[round] = {'B', 'A', 'A','B', 'A', 'A','B', 'A', 'A','B', 'A', 'A','B', 'A', 'A'};
int million_stay_in_game = 0, million_reward = 0;
int million_stay_in_game = 0, million_reward = 0, million_checkpoint = 0;
int million_lifeline_hint = 1, million_lifeline_delete = 1;
char questions[round][256] = {
@ -719,6 +719,17 @@ void play_milliongame() {
printf("\nCorrect!");
million_reward = million_reward + (10000 * (million_i+1));
printf("\n%d\n",million_reward);
if(million_i == 0){
million_checkpoint = 0;
}
else if(million_i == 4){
million_checkpoint = million_reward;
}
else if(million_i == 9)
million_checkpoint = million_reward;
else{}
}
else{
printf("\nIncorrect!");
@ -730,6 +741,17 @@ void play_milliongame() {
million_reward = million_reward + (10000 * (million_i+1));
printf("\n%d\n",million_reward);
printf("\nCorrect!");
if(million_i == 0){
million_checkpoint = 0;
}
else if(million_i == 4){
million_checkpoint = million_reward;
}
else if(million_i == 9)
million_checkpoint = million_reward;
else{}
}
else{
printf("\nIncorrect!");
@ -741,6 +763,17 @@ void play_milliongame() {
million_reward = million_reward + (10000 * (million_i+1));
printf("\n%d\n",million_reward);
printf("\nCorrect!");
if(million_i == 0){
million_checkpoint = 0;
}
else if(million_i == 4){
million_checkpoint = million_reward;
}
else if(million_i == 9)
million_checkpoint = million_reward;
else{}
}
else{
printf("\nIncorrect!");
@ -752,6 +785,16 @@ void play_milliongame() {
million_reward = million_reward + (10000 * (million_i+1));
printf("\n%d\n",million_reward);
printf("\nCorrect!");
if(million_i == 0){
million_checkpoint = 0;
}
else if(million_i == 4){
million_checkpoint = million_reward;
}
else if(million_i == 9)
million_checkpoint = million_reward;
else{}
}
else{
printf("\nIncorrect!");
@ -813,7 +856,7 @@ void play_milliongame() {
million_i++;
}
printf("\n%d\n",million_reward);
printf("\n%d\n",million_checkpoint);
// code for game 3 goes here
}

Loading…
Cancel
Save