public Card DealCard()
        {
            if (AllCards.FirstOrDefault().Value == 0)
            {
                ShuffleAllCards();
            }

            var card = AllCards.FirstOrDefault();

            AllCards.Remove(card);
            DiscardPile.Add(card);
            return(card);
        }
예제 #2
0
 public static Card FromName(string cardName)
 {
     return(AllCards.FirstOrDefault(x => x.Value.Name == cardName).Value);
 }
예제 #3
0
 public Card GetCardById(int cardId)
 {
     return(AllCards.FirstOrDefault(p => p.CardId == cardId));
 }