Example #1
0
        public bool Play()
        {
            GetPlayBoard();

            if (_game.IsGameOver())
            {
                _view.DisplayGameOver(_game.IsDealerWinner());
            }

            view.PlayerAction input = _view.GetMenuOption();

            if (input == view.PlayerAction.DoPlay)
            {
                _game.NewGame();
            }
            else if (input == view.PlayerAction.DoHit)
            {
                _game.Hit();
            }
            else if (input == view.PlayerAction.DoStand)
            {
                _game.Stand();
            }

            return(input != view.PlayerAction.DoQuit);
        }