|
@ -7,6 +7,9 @@ import Gui.GameGui; |
|
|
|
|
|
|
|
|
public class loadNextQuestion implements ActionListener { |
|
|
public class loadNextQuestion implements ActionListener { |
|
|
|
|
|
|
|
|
|
|
|
GameGui gameStatus = new GameGui(); |
|
|
|
|
|
runGame StartGame = new runGame(); |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void actionPerformed(ActionEvent e) { |
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
@ -48,18 +51,15 @@ public class loadNextQuestion implements ActionListener { |
|
|
|
|
|
|
|
|
public void loadQuestions() { |
|
|
public void loadQuestions() { |
|
|
if (GameGui.questionNr != runGame.arrQuestions.length - 1) { |
|
|
if (GameGui.questionNr != runGame.arrQuestions.length - 1) { |
|
|
runGame StartGame = new runGame(); |
|
|
|
|
|
StartGame.run(GameGui.questionNr); |
|
|
StartGame.run(GameGui.questionNr); |
|
|
} else { |
|
|
} else { |
|
|
GameGui gameWin = new GameGui (); |
|
|
|
|
|
gameWin.createWinningPanel(); |
|
|
|
|
|
|
|
|
gameStatus.createWinningPanel(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void wrongAnswer() { |
|
|
public void wrongAnswer() { |
|
|
GameGui gameLose = new GameGui(); |
|
|
|
|
|
gameLose.createLosingPanel(); |
|
|
|
|
|
gameLose.createRestartButton(); |
|
|
|
|
|
|
|
|
gameStatus.createLosingPanel(); |
|
|
|
|
|
gameStatus.createRestartButton(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |