Browse Source

implemented method to check if the third answer is correct

master
Ozan-Can Ekinci 2 years ago
parent
commit
bf97724c2f
  1. 4
      QandA/Answers.txt
  2. 10
      src/main/java/game/loadNextQuestion.java

4
QandA/Answers.txt

@ -1,4 +1,4 @@
right,wrong,wrong,wrong,1 right,wrong,wrong,wrong,1
wrong,right,wrong,right,2
-,-,-,-,3
wrong,right,wrong,wrong,2
wrong,wrong,right,wrong,3
-,-,-,-,4 -,-,-,-,4

10
src/main/java/game/loadNextQuestion.java

@ -32,6 +32,16 @@ public class loadNextQuestion implements ActionListener {
} }
} }
else if (runGame.splitAns[4].equals("3")) {
if (e.getSource() == GameGui.AnswersBtn3) {
if (GameGui.questionNr != runGame.arrQuestions.length - 1) {
runGame StartGame = new runGame();
StartGame.run(GameGui.questionNr);
}
} else {
System.exit(0);
}
}
} }

Loading…
Cancel
Save