Ejemplo n.º 1
0
 public void Save(string fileName)
 {
     var game = new SavedGame
     {
         AvailableSuits = _availableSuits,
         Collection = Collection,
         IsGameOver = IsGameOver,
         TopCount = _topCount,
         Steps = _steps,
         Score = Score
     };
     XmlUtilities<SavedGame>.Serialize(game, fileName);
 }
Ejemplo n.º 2
0
 public void Resore(SavedGame game)
 {
     Clear();
     IsGameOver = game.IsGameOver;
     IsSomethingSelected = false;
     Score = game.Score;
     _topCount = game.TopCount;
     _availableSuits.AddRange(game.AvailableSuits);
     _collection.Copy(game.Collection, _availableSuits);
     _steps.AddRange(game.Steps);
     NotifyCardsChanged();
 }