|
|
@ -14,7 +14,6 @@ public class runGame { |
|
|
|
public static String[] arrAnswers = readFile(AnswersPath); |
|
|
|
public static String[] splitAns; |
|
|
|
|
|
|
|
|
|
|
|
public void run(int i) { |
|
|
|
splitAns = SplitAnswers(arrAnswers, i); |
|
|
|
GameGui.QuestionLabel.setText(arrQuestions[i]); |
|
|
@ -24,6 +23,7 @@ public class runGame { |
|
|
|
GameGui.AnswersBtn4.setText(splitAns[3]); |
|
|
|
GameGui.questionNr++; |
|
|
|
} |
|
|
|
|
|
|
|
public static int CountFileLines(String Path) { |
|
|
|
int Numlines = 0; |
|
|
|
try { |
|
|
@ -39,6 +39,7 @@ public class runGame { |
|
|
|
return Numlines + 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static String[] readFile(String Path) { |
|
|
|
BufferedReader reader; |
|
|
|
String[] Arr = new String[lines]; |
|
|
@ -57,6 +58,7 @@ public class runGame { |
|
|
|
} |
|
|
|
return Arr; |
|
|
|
} |
|
|
|
|
|
|
|
public static String[] SplitAnswers(String[] data2, int i) { |
|
|
|
String[] parts = data2[i].split(","); |
|
|
|
return parts; |
|
|
|