Ejemplo n.º 1
0
        private PokerCard[] Mixup(int i, int randomnumber, PokerCard[] deck)
        {
            if (randomnumber < deck.Length)
            {
                PokerCard temp = deck.ElementAt(randomnumber);
                deck[randomnumber] = deck.ElementAt(i);
                deck[i]            = temp;
            }


            return(deck);
        }
Ejemplo n.º 2
0
        public PokerCard[] CreateDeck()
        {
            List <PokerCard> deck = new List <PokerCard>();

            foreach (Faces face in Enum.GetValues(typeof(Faces)))
            {
                foreach (Suit suit in Enum.GetValues(typeof(Suit)))
                {
                    PokerCard card = new PokerCard();
                    card.Suit  = suit.ToString();
                    card.Faces = face.ToString();
                    deck.Add(card);
                }
            }

            return(deck.ToArray());
        }