|
|
@ -10,8 +10,8 @@ public class runGame { |
|
|
|
public static String QuestionsPath = "QandA/Questions.txt"; |
|
|
|
public static String AnswersPath = "QandA/Answers.txt"; |
|
|
|
public static int lines = CountFileLines(QuestionsPath); |
|
|
|
public static String[] arrQuestions = readFile(QuestionsPath); |
|
|
|
public static String[] arrAnswers = readFile(AnswersPath); |
|
|
|
public static String[] arrQuestions = readFile(QuestionsPath, lines); |
|
|
|
public static String[] arrAnswers = readFile(AnswersPath, lines); |
|
|
|
public static String[] splitAns; |
|
|
|
|
|
|
|
public void run(int i) { |
|
|
@ -40,9 +40,9 @@ public class runGame { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static String[] readFile(String Path) { |
|
|
|
public static String[] readFile(String Path, int Lines) { |
|
|
|
BufferedReader reader; |
|
|
|
String[] Arr = new String[lines]; |
|
|
|
String[] Arr = new String[Lines]; |
|
|
|
try { |
|
|
|
reader = new BufferedReader(new FileReader(Path)); |
|
|
|
String line = reader.readLine(); |
|
|
|