From 5dcafb889f3fdd5f1902f43034aa90859bbed436 Mon Sep 17 00:00:00 2001 From: top19 Date: Fri, 1 May 2020 09:50:30 +0100 Subject: [PATCH] Fixed issue where you can add words with empty boxes. --- .../aber/cs221/group20/selfassessment/AssessmentGenerator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/AssessmentGenerator.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/AssessmentGenerator.java index f263c8b..09692f2 100644 --- a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/AssessmentGenerator.java +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/AssessmentGenerator.java @@ -50,6 +50,7 @@ public class AssessmentGenerator { LinkedList listOfAssessment = new LinkedList<>(); Random rand = new Random(); + reset(); //int wordToTranslatePlace; @@ -66,6 +67,7 @@ public class AssessmentGenerator { for (int numberToGenerate = 0; numberToGenerate < 10; numberToGenerate++) { Question generatedAssessment = null; int quizType = rand.nextInt(3); + System.out.println(numberToGenerate); switch (quizType) { case (0): //0 Means translation test. //wordToTranslatePlace = rand.nextInt(Application.practiseList.size());