Ejemplo n.º 1
0
        public void DealAllPlayers(uint numberOfCards)
        {
            _onGoing = true;

            if ((_players.Count * numberOfCards) < _deck.Size)
            {
                foreach (var player in _players)
                {
                    _deck.DealCards(player, numberOfCards);
                }
            }
            else
            {
                throw new InvalidOperationException("Not enough cards in deck!");
            }
        }