Exemple #1
0
        public bool Play(model.Game a_game, view.IView a_view)
        {
            a_game.RegisterNewCardDealer(this);

            this.game = a_game;
            this.view = a_view;
            CardDisplayer();

            if (a_game.IsGameOver())
            {
                a_view.DisplayGameOver(a_game.IsDealerWinner());
            }

            int input = a_view.GetInput();

            switch (input)
            {
            case 1: { a_game.NewGame(); break; }

            case 2: { a_game.Hit(); break; }

            case 3: { a_game.Stand(); break; }

            case 4: { return(input != 4); }
            }
            return(input != 4);
        }