public Deck GetFreshDeck() { Deck freshDeck = new Deck(); // nice way to initialize the Deck, using // builtin functionality of Enum foreach (Suit s in Enum.GetValues(typeof(Suit))) foreach (Rank r in Enum.GetValues(typeof(Rank))) if (r != Rank.Unassigned && s != Suit.Unassigned) freshDeck.Add(new Card(r, s)); return freshDeck; }
public void Shuffle(Deck deckToShuffle) { deck = deckToShuffle; this.Shuffle(); }
public void Shuffle(Deck deckToShuffle, int howManyTimes) { deck = deckToShuffle; this.Shuffle(howManyTimes); }
public StandardShuffler(Deck d) : this() { deck = d; }