Beispiel #1
0
        static void Main(string[] args)
        {
            IDisplay blDisplay = new BusinessDisplay(   new Display(),
                                                        new BusinessStatistic(new HiddenWordDALXml.DAL()),
                                                        new BusinessWord(new HiddenWordDALXml.DAL()),
                                                        new BusinessSetup(new HiddenWordDALXml.DAL()),
                                                        new BusinessUser(new HiddenWordDALXml.DAL()));
            BL Bl = new BL( new BusinessStatistic(new HiddenWordDALXml.DAL()),
                            new BusinessWord(new HiddenWordDALXml.DAL()),
                            new BusinessSetup(new HiddenWordDALXml.DAL()),
                            new BusinessUser(new HiddenWordDALXml.DAL()),
                            new HiddenWordDALXml.DAL(),
                            blDisplay);

            Bl.BlDisplay.displayWelcomeScreen();

            Game game = new Game(Bl, new Setting(Bl));

            game.run();
        }
Beispiel #2
0
        //===================================================================================================================
        //=======================================================[ Methods ]=================================================
        //===================================================================================================================
        /// <summary>
        /// Initialize the game
        /// </summary>
        private void Init()
        {
            display = new classes.Display(  this,           // The main Window
                                            gvMain,         // Main grid
                                            gvCentral,      // Central grid for dialogBox
                                            titlePanel,     // StackPanel top for title
                                            inputGamer,     // TextBlock user input
                                            Response,       // Label user response input
                                            MyChart,        // Chart object
                                            menuExit,
                                            menuStart,
                                            menuMaxTry,
                                            menuUserSelect,
                                            menuUserCreate,
                                            menuStatistic
                                            );

            IDisplay blDisplay = new BusinessDisplay(display,
                                                        new BusinessStatistic(new HiddenWordDALXml.DAL()),
                                                        new BusinessWord(new HiddenWordDALXml.DAL()),
                                                        new BusinessSetup(new HiddenWordDALXml.DAL()),
                                                        new BusinessUser(new HiddenWordDALXml.DAL()));
            Bl = new BL(new BusinessStatistic(new HiddenWordDALXml.DAL()),
                            new BusinessWord(new HiddenWordDALXml.DAL()),
                            new BusinessSetup(new HiddenWordDALXml.DAL()),
                            new BusinessUser(new HiddenWordDALXml.DAL()),
                            new HiddenWordDALXml.DAL(),
                            blDisplay);

            player = new Player(Bl, new Setting(Bl), new Random());
            display.btn_clickEvent += Display_btn_clickEvent;
        }