Update Question.java

This commit is contained in:
maj83 2020-04-27 16:42:51 +01:00
parent 8d9545f86b
commit 20b3e0c598

View file

@ -30,13 +30,13 @@ public class Question {
public void checkAnswer(ArrayList<DictionaryEntry> listOfCorrectQuestions, ArrayList<String>listOfAnswers, boolean isEnglish){
if(isEnglish){
for(int i=0; i<listOfCorrectQuestions.size();i++){
if(listOfCorrectQuestions.get(i).getWelsh().equals(listOfAnswers.get(i))){
if(listOfCorrectQuestions.get(i).getEnglish().equals(listOfAnswers.get(i))){
correctAnswer++;
}else wrongAnswer++;
}
}else{
for(int i=0; i<listOfCorrectQuestions.size();i++){
if(listOfCorrectQuestions.get(i).getEnglish().equals(listOfAnswers.get(i))){
if(listOfCorrectQuestions.get(i).getWelsh().equals(listOfAnswers.get(i))){
correctAnswer++;
}else wrongAnswer++;
}