public CardDeck() { foreach (CardSuit s in CardSuitChoices.All) { for (int r = PlayingCard.Ace; r <= PlayingCard.King; r++) { PlayingCard card = new PlayingCard(r, s); card.FaceUp = true; deck.Add(card); } } IShuffler shuffler = new KnuthShuffler(); CurrentShufflerMethod = shuffler.Shuffle; }
public CardDeck Shuffle(ShufflerMethod method) { method(deck); return(this); }
public void ChangeShuffler(IShuffler shuffler) { CurrentShufflerMethod = shuffler.Shuffle; }
public void ChangeShuffler(ShufflerMethod method) { CurrentShufflerMethod = method; }