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