Exemplo n.º 1
0
        static void Main(string[] args)
        {
            model.Game g = new model.Game();
            view.IView v = new view.SimpleView(); // new view.SwedishView();
            controller.PlayGame ctrl = new controller.PlayGame(v, g);

            while (ctrl.Play(g));
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            model.Game g = new model.Game();
            view.IView v = new view.SimpleView(); // new view.SwedishView();
            controller.PlayGame ctrl = new controller.PlayGame(g, v);

            g.CardChecker(ctrl);
            while (ctrl.Play());
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            model.Game g = new model.Game();
            view.IView v = new view.SimpleView(); // new view.SwedishView();
            model.PlayGame c = new model.PlayGame();
            g.ObserveCards(c);

            while (c.Play(g, v)) ;
        }
Exemplo n.º 4
0
 static void Main(string[] args)
 {
     view.IView          v    = new view.SimpleView(); // new view.SwedishView();
     controller.PlayGame ctrl = new controller.PlayGame(v);
     model.Game          g    = new model.Game(ctrl);
     while (ctrl.Play(g))
     {
         ;
     }
 }
Exemplo n.º 5
0
        static void Main(string[] args)
        {
            model.Game g = new model.Game();
            view.IView v = new view.SimpleView(); // new view.SwedishView();
            controller.PlayGame ctrl = new controller.PlayGame();

            g.SubscribeToCardDrawn(ctrl);

            while (ctrl.Play(g, v)) ;
        }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
            model.Game g = new model.Game();
            view.IView v = new view.SimpleView(); // new view.SwedishView();
            controller.PlayGame ctrl = new controller.PlayGame();

            //Register controller as listener to the card add
            g.SubscribeToCardAdds(ctrl);

            while (ctrl.Play(g, v));
        }
Exemplo n.º 7
0
        static void Main(string[] args)
        {
            view.IView          v    = new view.SimpleView(); // new view.SwedishView();
            model.Game          g    = new model.Game((model.IExcitingObserver)v);
            controller.PlayGame ctrl = new controller.PlayGame();

            while (ctrl.Play(g, v))
            {
                ;
            }
        }
Exemplo n.º 8
0
        static void Main(string[] args)
        {
            // TESTAR....
            model.Game          g    = new model.Game();
            view.IView          v    = new view.SimpleView(); // new view.SwedishView();
            controller.PlayGame ctrl = new controller.PlayGame(g, v);

            while (ctrl.Play())
            {
                ;
            }
        }
Exemplo n.º 9
0
        private static void InitializeApp()
        {
            model.Game                   g    = new model.Game();
            view.IView                   v    = new view.SimpleView(); // new view.SwedishView();
            controller.PlayGame          ctrl = new controller.PlayGame();
            controller.DealtCardObserver o    =
                new controller.DealtCardObserver(g, v);

            while (ctrl.Play(g, v, o))
            {
                ;
            }
        }
Exemplo n.º 10
0
        static void Main(string[] args)
        {
            model.Game          g    = new model.Game();
            view.IView          v    = new view.SimpleView(); // new view.SwedishView();
            controller.PlayGame ctrl = new controller.PlayGame();

            g.SubscriptionToNewCards(ctrl);

            while (ctrl.Play(g, v))
            {
                ;
            }
        }
Exemplo n.º 11
0
        static void Main(string[] args)
        {
            model.Game g = new model.Game();// // ändrat til CardObserver
            view.IView v = new view.SimpleView(); // new view.SwedishView();
            controller.PlayGame ctrl = new controller.PlayGame(g, v); // ändrat

            g.SetPlayerObserver(ctrl);

            while (ctrl.Play()) ;// ändrat

            /*controller.PlayGame ctrl = new controller.PlayGame();
            while (ctrl.Play(g, v));*/
        }
Exemplo n.º 12
0
        static void Main(string[] args)
        {
            model.Game game = new model.Game();
            var swedishView = false;
            view.IView view;
            if (swedishView)
                view = new view.SwedishView();
            else
                view = new view.SimpleView();
            controller.PlayGame ctrl = new controller.PlayGame(game, view);

            while (ctrl.Play());
        }
Exemplo n.º 13
0
        static void Main(string[] args)
        {
            view.IView          v        = new view.SimpleView();
            controller.PlayGame ctrl     = new controller.PlayGame();
            model.Dealer        m_dealer = new model.Dealer(new model.rules.RulesFactory());
            m_dealer.SubscriberList += ctrl.HandleEvent;

            model.Game g = new model.Game(m_dealer);

            while (ctrl.Play(g, v))
            {
                ;
            }
        }
Exemplo n.º 14
0
        static void Main(string[] args)
        {
            model.Game g = new model.Game();
            view.IView v = new view.SimpleView(); // new view.SwedishView();

            model.IObserver co = new controller.CardObserver(g, v);
            g.AddCardObserver(co);

            controller.PlayGame ctrl = new controller.PlayGame();

            while (ctrl.Play(g, v))
            {
                ;
            }
        }