public Deck PullOutValues(Values value) { Deck deckToReturn = new Deck(new Card[] { }); for (int i = cards.Count - 1; i >= 0; i--) if (cards[i].Value == value) deckToReturn.Add(Deal(i)); return deckToReturn; }
private void DealCards(Deck deckToDeal, string title) { Console.WriteLine(title); while (deckToDeal.Count > 0) { Card nextCard = deckToDeal.Deal(0); Console.WriteLine(nextCard.Name); } Console.WriteLine("------------------"); }
private Deck RandomDeck(int number) { Deck myDeck = new Deck(new Card[] { }); for (int i = 0; i < number; i++) { myDeck.Add(new Card( (Suits)random.Next(4), (Values)random.Next(1, 14))); } return myDeck; }