Beispiel #1
0
 public async Task LoadGameAsync(SavedWaste gameData)
 {
     PreviousSelected = gameData.PreviousSelected;
     if (HasDiscard == false)
     {
         await Piles.LoadSavedGameAsync(gameData.PileData);
     }
     else
     {
         Discards !.PileList = await js.DeserializeObjectAsync <CustomBasicList <BasicPileInfo <SolitaireCard> > >(gameData.PileData);
     }
     GetUnknowns();
 }
Beispiel #2
0
        public async Task <SavedWaste> GetSavedGameAsync()
        {
            SavedWaste output = new SavedWaste();

            output.PreviousSelected = PreviousSelected;
            if (HasDiscard == false)
            {
                output.PileData = await Piles.GetSavedGameAsync();
            }
            else
            {
                output.PileData = await js.SerializeObjectAsync(Discards !.PileList !);
            }
            return(output);
        }