public void DealCard(int numberOfCards, Player player) { for (int i = 0; i < numberOfCards; i++) { if (_cardsInDeck.Count != 0) { int cardIndex = _cardDealer.Next(0, _cardsInDeck.Count - 1); player.AddCardToHand(_cardsInDeck[cardIndex]); _cardsInDeck.RemoveAt(cardIndex); } else { Console.WriteLine("Not enugh cards: " + player._name + " is missing " + (numberOfCards - i).ToString() + " cards"); break; } } }