示例#1
0
 public PlayGame(model.Game g, view.IView v)
 {
     a_game = g;
     a_view = v;
     a_view.DisplayWelcomeMessage();
     a_game.Subscribe(this);
 }
示例#2
0
        public bool Play()
        {
            m_game.Subscribe(this);

            DealtCard();

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

            Input input = m_view.GetInput();

            switch (input)
            {
            case Input.Play:
                m_game.NewGame();
                break;

            case Input.Hit:
                m_game.Hit();
                break;

            case Input.Stand:
                m_game.Stand();
                break;
            }
            return(input != Input.Quit);;
        }
示例#3
0
 public PlayGame(model.Game g, view.IView v)
 {
     a_game = g;
     a_view = v;
     a_view.DisplayWelcomeMessage();
     a_game.Subscribe(this);
 }