Fixed issue where you can add words with empty boxes.

This commit is contained in:
top19 2020-05-01 09:50:30 +01:00
parent ea4dc91914
commit 5dcafb889f

View file

@ -50,6 +50,7 @@ public class AssessmentGenerator {
LinkedList<Question> listOfAssessment = new LinkedList<>(); LinkedList<Question> listOfAssessment = new LinkedList<>();
Random rand = new Random(); Random rand = new Random();
reset(); reset();
//int wordToTranslatePlace; //int wordToTranslatePlace;
@ -66,6 +67,7 @@ public class AssessmentGenerator {
for (int numberToGenerate = 0; numberToGenerate < 10; numberToGenerate++) { for (int numberToGenerate = 0; numberToGenerate < 10; numberToGenerate++) {
Question generatedAssessment = null; Question generatedAssessment = null;
int quizType = rand.nextInt(3); int quizType = rand.nextInt(3);
System.out.println(numberToGenerate);
switch (quizType) { switch (quizType) {
case (0): //0 Means translation test. case (0): //0 Means translation test.
//wordToTranslatePlace = rand.nextInt(Application.practiseList.size()); //wordToTranslatePlace = rand.nextInt(Application.practiseList.size());