Example #1
0
        public cardClass discard(int i)
        {
            cardClass temp = hand[i];

            hand.RemoveAt(i);
            return(temp);
        }
Example #2
0
 public cardClass Deal()
 {
     if (cards.Count > 0)
     {
         cardClass temp = cards[0];
         cards.RemoveAt(0);
         return(temp);
     }
     return(null);
 }
Example #3
0
        public deck Shuffle()
        {
            Random rand = new Random();

            for (int i = cards.Count - 1; i > 0; i--)
            {
                int       randI = rand.Next(i);
                cardClass temp  = cards[randI];
                cards[randI] = cards[i];
                cards[i]     = temp;
            }
            return(this);
        }