コード例 #1
0
ファイル: PlayGame.cs プロジェクト: larswww/BlackJack
        public bool Play()
        {
            DisplayWelcomeMessageAndHands();

            if (m_game.IsGameOver())
            {
                m_view.DisplayGameOver(m_game.IsDealerWinner());
            }

            ViewAction action = m_view.GetAction();

            if (action == ViewAction.Newgame)
            {
                m_game.NewGame();
            }
            else if (action == ViewAction.Hit)
            {
                m_game.Hit();
            }
            else if (action == ViewAction.Stand)
            {
                m_game.Stand();
            }

            return(action != ViewAction.Quit);
        }