Пример #1
0
 /// <summary>
 /// Adds the passed games to the list of games, and saves the newly updated list to the file.
 /// </summary>
 /// <param name="newGame">The games to be added.</param>
 public void AddGame(List <Game> newGame)
 {
     foreach (Game game in newGame)
     {
         StoreGameCollection.Add(game);
     }
     FileHandler.WriteFile(Constants.GameFileListName, StoreGameCollection);
 }
Пример #2
0
 /// <summary>
 /// Adds the passed game to the list of games, and saves the newly updated list to the file.
 /// </summary>
 /// <param name="newGame">The game to be added.</param>
 public void AddGame(Game newGame)
 {
     StoreGameCollection?.Add(newGame);
     FileHandler.WriteFile(Constants.GameFileListName, StoreGameCollection);
 }