/// <summary>
 /// Replaces a card with a new card, using the same ratio as the old card.
 /// Returns false if the old card cannot be found on the deck.
 /// </summary>
 /// <param name="oldCard"></param>
 /// <param name="newCard"></param>
 public bool ReplaceCard(WeissSchwarzCard oldCard, WeissSchwarzCard newCard)
 {
     if (newCard == null)
     {
         return(false);
     }
     else if (Ratios.TryGetValue(oldCard, out int oldRatio))
     {
         Ratios[newCard] = oldRatio;
         Ratios.Remove(oldCard);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #2
0
 internal async Task <WeissSchwarzCard> FindNonFoil(WeissSchwarzCard card)
 {
     return(await WeissSchwarzCards.FindAsync(WeissSchwarzCard.RemoveFoil(card.Serial)));
 }