Browse Source

AntwortenNeuAnzeigen

remotes/origin/Kevin
Kevin Schellberg 11 months ago
parent
commit
878b888aeb
  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. 29
      src/quizduell.c

2
build/test/results/test_casualQuiz.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.01621530000011262
:time: 0.0158051999997042

2
build/test/results/test_quizduell.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.03237170000011247
:time: 0.01642370000035953

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.016029299999900104
:time: 0.01555129999997007

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.01667379999980767
:time: 0.016281299999718613

29
src/quizduell.c

@ -47,6 +47,35 @@ int spieleKategorie(Kategorie* kategorie) {
char korrekteAntwort = kategorie->fragen[i].korrekteAntwort; char korrekteAntwort = kategorie->fragen[i].korrekteAntwort;
int gestrichen = 0; int gestrichen = 0;
for (char option = 'A'; option <= 'D'; option++) {
if (option != korrekteAntwort && gestrichen < 2) {
switch (option) {
case 'A':
strcpy(kategorie->fragen[i].antwortA, "XXXXXX");
gestrichen++;
break;
case 'B':
strcpy(kategorie->fragen[i].antwortB, "XXXXXX");
gestrichen++;
break;
case 'C':
strcpy(kategorie->fragen[i].antwortC, "XXXXXX");
gestrichen++;
break;
case 'D':
strcpy(kategorie->fragen[i].antwortD, "XXXXXX");
gestrichen++;
break;
}
}
}
// Zeigt die Antworten erneut an
printf("\nA) %s\nB) %s\nC) %s\nD) %s\n", kategorie->fragen[i].antwortA, kategorie->fragen[i].antwortB, kategorie->fragen[i].antwortC, kategorie->fragen[i].antwortD);
break;
} }
} }
} }

Loading…
Cancel
Save