|
@ -21,6 +21,7 @@ public class GameGui implements GameGuiInterface { |
|
|
public static int questionNr = 0; |
|
|
public static int questionNr = 0; |
|
|
public static int currentQuestion = 1; |
|
|
public static int currentQuestion = 1; |
|
|
public static int highScore = 0; |
|
|
public static int highScore = 0; |
|
|
|
|
|
public static String Path ="QandA/Money.txt"; |
|
|
GridLayout grid; |
|
|
GridLayout grid; |
|
|
GridBagConstraints gbc; |
|
|
GridBagConstraints gbc; |
|
|
|
|
|
|
|
@ -104,16 +105,16 @@ public class GameGui implements GameGuiInterface { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void createShowQuestion(int i) { |
|
|
|
|
|
int numLines = runGame.CountFileLines("QandA/Money.txt"); |
|
|
|
|
|
String[] arrMoney = runGame.readFile("QandA/Money.txt", numLines); |
|
|
|
|
|
String questionText = "Frage " + currentQuestion + ": " + arrMoney[i - 1] + " Euro"; |
|
|
|
|
|
currentQuestion++; |
|
|
|
|
|
|
|
|
|
|
|
CurrentQuestionNrLabel.setText(questionText); |
|
|
|
|
|
CurrentQuestionNrLabel.setFont(new Font("Serif", Font.BOLD, 20)); |
|
|
|
|
|
MainPanel.add(CurrentQuestionNrLabel); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public void createShowQuestion(int i, String Path) { |
|
|
|
|
|
int numLines = runGame.CountFileLines(Path); |
|
|
|
|
|
String[] arrMoney = runGame.readFile(Path, numLines); |
|
|
|
|
|
String questionText = "Frage " + currentQuestion + ": " + arrMoney[i - 1] + " Euro"; |
|
|
|
|
|
currentQuestion++; |
|
|
|
|
|
|
|
|
|
|
|
CurrentQuestionNrLabel.setText(questionText); |
|
|
|
|
|
CurrentQuestionNrLabel.setFont(new Font("Serif", Font.BOLD, 20)); |
|
|
|
|
|
MainPanel.add(CurrentQuestionNrLabel); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void createHeadline() { |
|
|
public void createHeadline() { |
|
|