Browse Source

implemented method to check if the first answer ist correct

master
Ozan-Can Ekinci 2 years ago
parent
commit
66fa54be5a
  1. 6
      QandA/Answers.txt
  2. 6
      QandA/Questions.txt
  3. 17
      src/main/java/game/loadNextQuestion.java

6
QandA/Answers.txt

@ -1,2 +1,4 @@
187m,301m,69m,300m
erkentnisse gewinnen,zur ainsicht gelangen,eine leere ziehen,erfarungen sammeln
right,wrong,wrong,wrong,1
-,-,-,-,2
-,-,-,-,3
-,-,-,-,4

6
QandA/Questions.txt

@ -1,2 +1,4 @@
Wie hoch ist der Eifelturm?
Wurden alle Bierflaschen ausgetrunken, kann man aus dem Kasten nur noch ...?
test1
test2
test3
test4

17
src/main/java/game/loadNextQuestion.java

@ -3,12 +3,25 @@ package game;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import Gui.GameGui;
public class loadNextQuestion implements ActionListener { public class loadNextQuestion implements ActionListener {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
if (runGame.splitAns[4].equals("1")) {
if (e.getSource() == GameGui.AnswersBtn1) {
if (GameGui.questionNr != runGame.arrQuestions.length - 1) {
runGame StartGame = new runGame();
StartGame.run(GameGui.questionNr);
}
} else {
System.exit(0);
}
}
} }
} }
Loading…
Cancel
Save