From 89e82a8861e5c83f2c62ed5a060c1ddfc3dcfd5b Mon Sep 17 00:00:00 2001 From: Leon Montag Date: Fri, 30 Dec 2022 11:33:31 +0100 Subject: [PATCH] Implemented String Array and return statement --- src/main/java/Gui/StartGameGui.java | 1 + src/main/java/game/runGame.java | 17 +++++++++++++++++ target/MiniGameProject-1.0-SNAPSHOT.jar | Bin 5350 -> 5705 bytes target/maven-archiver/pom.properties | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main/java/Gui/StartGameGui.java b/src/main/java/Gui/StartGameGui.java index 8c26298..38fd1a8 100644 --- a/src/main/java/Gui/StartGameGui.java +++ b/src/main/java/Gui/StartGameGui.java @@ -14,6 +14,7 @@ public class StartGameGui implements ActionListener { gui.Panel.setVisible(false); runGame rungame = new runGame(); + rungame.run(); } } diff --git a/src/main/java/game/runGame.java b/src/main/java/game/runGame.java index 0206dde..a52cc23 100644 --- a/src/main/java/game/runGame.java +++ b/src/main/java/game/runGame.java @@ -7,4 +7,21 @@ import java.io.IOException; public class runGame { public static String QuestionsPath = "QandA/Questions.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; + } + } diff --git a/target/MiniGameProject-1.0-SNAPSHOT.jar b/target/MiniGameProject-1.0-SNAPSHOT.jar index c8c99297500914098a6cb2b1c5e7e655dbc957bb..f2c986d3f3ad86c17397273d229579b35fd9ca8d 100644 GIT binary patch delta 1605 zcmaE+c~XZbz?+$civa|rVT^S~gD(dN*iLU#<9&EhU4u(WNq7CPFqXm#fyZYuDDm(; zUVed%W7?L<%TC!pT781Y!sr+CpTJi;w?BM%f&c8Yd3SAhSHD}f|NoyKtPc$5&CYQ4 zX-``yTi7^H_W9=EH5UKE3Nw?B>$Wm|j6DDSkY!`Uz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