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++; } }
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++; } }