Browse Source

While-Schleife für Spiel

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

5
src/timequiz.c

@ -54,6 +54,11 @@ void timequiz() {
memset(askedQuestions, 0, sizeof(askedQuestions));
srand((unsigned int)time(NULL));
while (elapsedTime < 60 && totalAnsweredQuestions < totalQuestions) {
int questionIndex = getRandomQuestionIndex(askedQuestions, totalQuestions);
askedQuestions[questionIndex] = 1;
}
}
int getRandomQuestionIndex(int askedQuestions[], int totalQuestions) {

Loading…
Cancel
Save