Example #1
0
 public void Reshuffle()
 {
     foreach (Card card in CardsPlayed)
     {
         CardsInDeck.Add(card);
         CardsPlayed.Remove(card);
     }
 }
Example #2
0
 public void DealStartCards()
 {
     for (int i = 0; i < 4; i++)
     {
         var card = CardsInDeck.Pop();
         card.RenderComponent = new Components.CardComponent(card, new RenderLocation(Console.WindowWidth / 2 - (i * 5), Console.WindowHeight - 28));
         CardsInHand.Add(card);
     }
 }
Example #3
0
        public Card GetCard()
        {
            Random r      = new Random();
            int    select = r.Next(0, CardsInDeck.Count);
            Card   card   = CardsInDeck.ElementAt(select);

            CardsInDeck.Remove(card);
            CardsPlayed.Add(card);

            return(card);
        }
        public void AddCardToDeck(int deckId, CardsInDeck card)
        {
            var deck = GetDeck(deckId, true);

            deck.Cards.Add(card);
        }