Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 public CardDeck Shuffle(ShufflerMethod method)
 {
     method(deck);
     return(this);
 }
Esempio n. 3
0
 public void ChangeShuffler(IShuffler shuffler)
 {
     CurrentShufflerMethod = shuffler.Shuffle;
 }
Esempio n. 4
0
 public void ChangeShuffler(ShufflerMethod method)
 {
     CurrentShufflerMethod = method;
 }