Beispiel #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));
        }
Beispiel #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());
        }
Beispiel #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)) ;
        }
Beispiel #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))
     {
         ;
     }
 }
Beispiel #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)) ;
        }
        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));
        }
Beispiel #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))
            {
                ;
            }
        }
Beispiel #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())
            {
                ;
            }
        }
        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))
            {
                ;
            }
        }
Beispiel #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))
            {
                ;
            }
        }
Beispiel #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));*/
        }
Beispiel #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());
        }
Beispiel #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))
            {
                ;
            }
        }
Beispiel #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))
            {
                ;
            }
        }