Exemplo n.º 1
0
 /// <summary>
 ///
 /// Remove a card from the deck
 ///
 /// </summary>
 public void RemoveCard(CardData cardData)
 {
     if (CardIdList.Contains(cardData.Id.Value))
     {
         CardList.Remove(cardData);
         CardIdList.Remove(cardData.Id.Value);
     }
     else
     {
         throw new Exception($"Card {cardData.Id} does not exist in the deck");
     }
 }