|
@ -12,49 +12,45 @@ public class loadNextQuestion implements ActionListener { |
|
|
|
|
|
|
|
|
if (runGame.splitAns[4].equals("1")) { |
|
|
if (runGame.splitAns[4].equals("1")) { |
|
|
if (e.getSource() == GameGui.AnswersBtn1) { |
|
|
if (e.getSource() == GameGui.AnswersBtn1) { |
|
|
if (GameGui.questionNr != runGame.arrQuestions.length - 1) { |
|
|
|
|
|
runGame StartGame = new runGame(); |
|
|
|
|
|
StartGame.run(GameGui.questionNr); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
loadQuestions(); |
|
|
} else { |
|
|
} else { |
|
|
System.exit(0); |
|
|
System.exit(0); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else if (runGame.splitAns[4].equals("2")) { |
|
|
else if (runGame.splitAns[4].equals("2")) { |
|
|
if (e.getSource() == GameGui.AnswersBtn2) { |
|
|
if (e.getSource() == GameGui.AnswersBtn2) { |
|
|
if (GameGui.questionNr != runGame.arrQuestions.length - 1) { |
|
|
|
|
|
runGame StartGame = new runGame(); |
|
|
|
|
|
StartGame.run(GameGui.questionNr); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
loadQuestions(); |
|
|
} else { |
|
|
} else { |
|
|
System.exit(0); |
|
|
System.exit(0); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else if (runGame.splitAns[4].equals("3")) { |
|
|
else if (runGame.splitAns[4].equals("3")) { |
|
|
if (e.getSource() == GameGui.AnswersBtn3) { |
|
|
if (e.getSource() == GameGui.AnswersBtn3) { |
|
|
if (GameGui.questionNr != runGame.arrQuestions.length - 1) { |
|
|
|
|
|
runGame StartGame = new runGame(); |
|
|
|
|
|
StartGame.run(GameGui.questionNr); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
loadQuestions(); |
|
|
} else { |
|
|
} else { |
|
|
System.exit(0); |
|
|
System.exit(0); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else if (runGame.splitAns[4].equals("4")) { |
|
|
else if (runGame.splitAns[4].equals("4")) { |
|
|
if (e.getSource() == GameGui.AnswersBtn4) { |
|
|
if (e.getSource() == GameGui.AnswersBtn4) { |
|
|
if (GameGui.questionNr != runGame.arrQuestions.length - 1) { |
|
|
|
|
|
runGame StartGame = new runGame(); |
|
|
|
|
|
StartGame.run(GameGui.questionNr); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
loadQuestions(); |
|
|
} else { |
|
|
} else { |
|
|
System.exit(0); |
|
|
System.exit(0); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void loadQuestions() { |
|
|
|
|
|
if (GameGui.questionNr != runGame.arrQuestions.length - 1) { |
|
|
|
|
|
runGame StartGame = new runGame(); |
|
|
|
|
|
StartGame.run(GameGui.questionNr); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |