Пример #1
0
 /// <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(R4UCard oldCard, R4UCard 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);
     }
 }