Browse Source

Implemented String Array and return statement

master
Leon Montag 2 years ago
parent
commit
89e82a8861
  1. 1
      src/main/java/Gui/StartGameGui.java
  2. 17
      src/main/java/game/runGame.java
  3. BIN
      target/MiniGameProject-1.0-SNAPSHOT.jar
  4. 2
      target/maven-archiver/pom.properties

1
src/main/java/Gui/StartGameGui.java

@ -14,6 +14,7 @@ public class StartGameGui implements ActionListener {
gui.Panel.setVisible(false); gui.Panel.setVisible(false);
runGame rungame = new runGame(); runGame rungame = new runGame();
rungame.run();
} }
} }

17
src/main/java/game/runGame.java

@ -7,4 +7,21 @@ import java.io.IOException;
public class runGame { public class runGame {
public static String QuestionsPath = "QandA/Questions.txt"; public static String QuestionsPath = "QandA/Questions.txt";
public static String AnswersPath = "QandA/Answers.txt"; public static String AnswersPath = "QandA/Answers.txt";
public void run() {
readFile(QuestionsPath);
}
public static String[] readFile(String Path) {
BufferedReader reader;
String[] Arr = new String[6];
try {
reader = new BufferedReader(new FileReader(Path));
String line = reader.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return Arr;
}
} }

BIN
target/MiniGameProject-1.0-SNAPSHOT.jar

2
target/maven-archiver/pom.properties

@ -1,5 +1,5 @@
#Generated by Maven #Generated by Maven
#Fri Dec 30 11:20:41 CET 2022
#Fri Dec 30 11:32:52 CET 2022
groupId=MiniGameProject groupId=MiniGameProject
artifactId=MiniGameProject artifactId=MiniGameProject
version=1.0-SNAPSHOT version=1.0-SNAPSHOT
Loading…
Cancel
Save