diff --git a/QandA/Answers.txt b/QandA/Answers.txt index 8294e97..bc02b9c 100644 --- a/QandA/Answers.txt +++ b/QandA/Answers.txt @@ -1,4 +1,5 @@ right,wrong,wrong,wrong,1 wrong,right,wrong,wrong,2 wrong,wrong,right,wrong,3 --,-,-,-,4 \ No newline at end of file +wrong,wrong,wrong,right,4 +-,-,-,-,1 \ No newline at end of file diff --git a/QandA/Questions.txt b/QandA/Questions.txt index dff34e0..1c7a207 100644 --- a/QandA/Questions.txt +++ b/QandA/Questions.txt @@ -1,4 +1,5 @@ test1 test2 test3 -test4 \ No newline at end of file +test4 +test5 \ No newline at end of file diff --git a/src/main/java/game/loadNextQuestion.java b/src/main/java/game/loadNextQuestion.java index 140b2ab..b38c8cb 100644 --- a/src/main/java/game/loadNextQuestion.java +++ b/src/main/java/game/loadNextQuestion.java @@ -42,7 +42,19 @@ public class loadNextQuestion implements ActionListener { System.exit(0); } } + + else if (runGame.splitAns[4].equals("4")) { + if (e.getSource() == GameGui.AnswersBtn4) { + if (GameGui.questionNr != runGame.arrQuestions.length - 1) { + runGame StartGame = new runGame(); + StartGame.run(GameGui.questionNr); + } + } else { + System.exit(0); + } + } + } }