public void LoadData(string filePath) { SaveData save = FileReadWrite.ReadFromJsonFile <SaveData>(filePath); for (int i = 0; i < loadExternalGenes; i++) { Population.Add(save.SavedMember[i]); } }
// Saving and Retrieving data public void SaveData(string filePath) { SaveData save = new SaveData { SavedMember = new List <NeuralNetwork>() }; for (int i = 0; i < saveGenes; i++) { save.SavedMember.Add(Population[i]); } FileReadWrite.WriteToJsonFile(filePath, save); }