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