Exemple #1
0
        private void newDeal()
        {
            cardPile.Shuffle(10);
            int position = 0;
            int playerPosition;

            for (int i = 0; i < 15; i++)
            {
                playerPosition = position % players.Count;
                players[playerPosition].CollectCard(cardPile.PutCard());
                position++;
            }
        }
Exemple #2
0
        private void newDealButton_Click(object sender, EventArgs e)
        {
            cardPile.Shuffle(10);
            int position = 0;
            int playerPosition;

            while (cardPile.NumberOfCards != 0)
            {
                playerPosition = position % 3;
                players[playerPosition].CollectCard(cardPile.PutCard());
                position++;
            }
        }