|
@ -6,7 +6,7 @@ |
|
|
|
|
|
|
|
|
#define NUM_ANSWERS 4 |
|
|
#define NUM_ANSWERS 4 |
|
|
#define ASKED_QUESTIONS 40 |
|
|
#define ASKED_QUESTIONS 40 |
|
|
|
|
|
|
|
|
|
|
|
#define MAX_QUIZ_TIME 60 |
|
|
|
|
|
|
|
|
//Funktionen des Codes |
|
|
//Funktionen des Codes |
|
|
void timequiz(); |
|
|
void timequiz(); |
|
@ -150,7 +150,7 @@ void timequiz() { |
|
|
srand((unsigned int)time(NULL)); |
|
|
srand((unsigned int)time(NULL)); |
|
|
|
|
|
|
|
|
//While-Schleife für Spielausführung |
|
|
//While-Schleife für Spielausführung |
|
|
while (elapsedTime < 60 && totalAnsweredQuestions < totalQuestions) { |
|
|
|
|
|
|
|
|
while (elapsedTime < MAX_QUIZ_TIME && totalAnsweredQuestions < totalQuestions) { |
|
|
int questionIndex = getRandomQuestionIndex(askedQuestions, totalQuestions); |
|
|
int questionIndex = getRandomQuestionIndex(askedQuestions, totalQuestions); |
|
|
askedQuestions[questionIndex] = 1; |
|
|
askedQuestions[questionIndex] = 1; |
|
|
|
|
|
|
|
|