Exemplo n.º 1
0
        public virtual void StartRound()
        {
            if (IsRoundInProgress)
            {
                throw new InvalidOperationException("Live round in progress");
            }

            if (!_roundPlayersQueuedForNextRound.Any())
            {
                throw new InvalidOperationException("No players have wagered");
            }

            var roundInProgress = new BlackjackGameRound(_roundPlayersQueuedForNextRound);

            _roundPlayersQueuedForNextRound.Clear();

            _dealer.Deal(roundInProgress);
        }