public static Game GetAccount(string name) { if (Datastorage.SaveExists(GameFile)) { _games = Datastorage.LoadGames(GameFile).ToList(); } else { Directory.CreateDirectory("Data/"); _games = new List <Game>(); SaveAccounts(); } return(GetOrCreateAccount(name)); }
public static void SaveAccounts() { Datastorage.SaveGames(_games, GameFile); }