Browse Source

refactoring: Konstante für Quizzeit hinzugefügt

remotes/origin/Pascal
Pascal Schneider 11 months ago
parent
commit
15151c4b61
  1. 4
      src/timequiz.c

4
src/timequiz.c

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

Loading…
Cancel
Save