public Card DealCard() { if (AllCards.FirstOrDefault().Value == 0) { ShuffleAllCards(); } var card = AllCards.FirstOrDefault(); AllCards.Remove(card); DiscardPile.Add(card); return(card); }
public static Card FromName(string cardName) { return(AllCards.FirstOrDefault(x => x.Value.Name == cardName).Value); }
public Card GetCardById(int cardId) { return(AllCards.FirstOrDefault(p => p.CardId == cardId)); }