This commit is contained in:
top19 2020-04-30 12:46:47 +01:00
commit 5b1ac5896d

View file

@ -133,20 +133,30 @@ public class MatchTheMeaningController extends SharedCodeController {
*/
public void checkAnswers(){
ArrayList<DictionaryEntry> answers = new ArrayList<>();
ArrayList<String> listOfAnswers = new ArrayList<>();
answers.add(answer.get(Integer.parseInt(word1.getValue())-1));
answers.add(answer.get(Integer.parseInt(word2.getValue())-1));
answers.add(answer.get(Integer.parseInt(word3.getValue())-1));
answers.add(answer.get(Integer.parseInt(word4.getValue())-1));
if(isEnglish){
listOfAnswers.add(RightWord1.getText());
listOfAnswers.add(RightWord2.getText());
listOfAnswers.add(RightWord3.getText());
listOfAnswers.add(RightWord4.getText());
}else {
listOfAnswers.add(LeftWord1.getText());
listOfAnswers.add(LeftWord2.getText());
listOfAnswers.add(LeftWord3.getText());
listOfAnswers.add(LeftWord4.getText());
}else {
listOfAnswers.add(RightWord1.getText());
listOfAnswers.add(RightWord2.getText());
listOfAnswers.add(RightWord3.getText());
listOfAnswers.add(RightWord4.getText());
}
Question.checkAnswer(answer,listOfAnswers,isEnglish);
Question.checkAnswer(answers,listOfAnswers,isEnglish);
answer.clear();