Esempio n. 1
0
        public bool startRound(int round)
        {
            CardUtility.ShufflePile(gameDeck);
            Hand[] hand = new Hand[4];

            int counter = 0;

            for (int j = 0; j < 4; j++)
            {
                hand[j] = new Hand();

                for (int i = counter; i < counter + 13; i++)
                {
                    hand[j].AddCard((SpadesCard)gameDeck.CardPile[i]);
                }

                counter = counter + 13;
                CardUtility.SortBySuit(hand[j]);
            }

            // initialize 4 players hand
            for (int k = 0; k < 4; k++)
            {
                SpadesPlayer[k].Hand = hand[k];
            }

            return(true);
        }
Esempio n. 2
0
 public void sort()
 {
     CardUtility.SortBySuit(this);
 }