private void Statistics(string timeCounterText, string genCounterText) { firstStatistics = SimulationManagerScript.Instance.firstStatistics; float time = HelperFunc.ParseTimeFromGUI(timeCounterText); if (firstStatistics) { SimulationManagerScript.Instance.firstStatistics = false; string[] currentRunInfo = SimulationManagerScript.Instance.GetCurrentRunInfo(); string stringInfo = "\nNEW DATA\n"; foreach (var stringData in currentRunInfo) { stringInfo += stringData + "\n"; } stringInfo += timeCounterText + "\n" + genCounterText + "\n"; File.AppendAllText(pathToStatisticsFile, stringInfo); } if (time < gui.GetCurrentBestTime()) { File.AppendAllText(pathToStatisticsFile, timeCounterText + "\t" + genCounterText + "\n"); gui.SetCurrentBestTime(time); } }
public float GetCurrentBestTime() { return(HelperFunc.ParseTimeFromGUI(BestTime.text)); }