Пример #1
0
 public void ChangeTrumpCard(Card newCard)
 {
     this.trumpCard = newCard;
     if (this.listOfCards.Count > 0)
     {
         this.listOfCards[0] = newCard;
     }
 }
Пример #2
0
        public Deck()
        {
            this.listOfCards = new List<Card>();
            foreach (var cardSuit in this.GetAllCardSuits())
            {
                foreach (var cardType in this.GetAllCardTypes())
                {
                    this.listOfCards.Add(new Card(cardSuit, cardType));
                }
            }

            this.listOfCards = this.listOfCards.Shuffle().ToList();

            this.trumpCard = this.listOfCards[0];
        }