Browse Source

refactoring: fragen anzeigen in eigene Funktion ausgelagert

remotes/origin/Florian
Florian Baeseler 11 months ago
parent
commit
63f0f6d97f
  1. 2
      build/test/results/test_casualQuiz.pass
  2. 2
      build/test/results/test_quizduell.pass
  3. 2
      build/test/results/test_timequiz.pass
  4. 2
      build/test/results/test_wwm.pass
  5. 6
      src/casualQuiz.c
  6. 2
      src/casualQuiz.h

2
build/test/results/test_casualQuiz.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.013279100006911904
:time: 0.01318790001096204

2
build/test/results/test_quizduell.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.013567399990279227
:time: 0.012945800001034513

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.01407669999753125
:time: 0.013551599986385554

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.013050099980318919
:time: 0.014078999985940754

6
src/casualQuiz.c

@ -25,7 +25,9 @@ void casualQuiz() {
void activePlaying(char *fragen[], char *antworten[], int richtige_antwort[], int size ){ void activePlaying(char *fragen[], char *antworten[], int richtige_antwort[], int size ){
for (int i = 0; i < size; i++){ for (int i = 0; i < size; i++){
printf(" %s\n1) %s\n2) %s\n3) %s\n4) %s\n %d\n", fragen[i], antworten[4 * i + 0], antworten[4 * i + 1], antworten[4 * i + 2], antworten[4 * i + 3], richtige_antwort[i]);
printf("1) %s\n2) %s\n3) %s\n4) %s\n %d\n", antworten[4 * i + 0], antworten[4 * i + 1], antworten[4 * i + 2], antworten[4 * i + 3], richtige_antwort[i]);
} }
} }
void FzeigeFragen(char *fragen[], int index){
printf("Question: %s\n", fragen[index]);
}

2
src/casualQuiz.h

@ -3,6 +3,6 @@
void casualQuiz(); void casualQuiz();
void activePlaying(char *fragen[], char *antworten[], int richtige_antwort[], int size); void activePlaying(char *fragen[], char *antworten[], int richtige_antwort[], int size);
void FzeigeFragen(char *fragen[], int index);
#endif // ende CASUALQUIZ_H #endif // ende CASUALQUIZ_H
Loading…
Cancel
Save