예제 #1
0
 public UnitTestBL()
 {
     blDisplay = new BusinessDisplay(new HiddenWordConsole.Classes.Display(),
                                                 new BusinessStatistic(new FakeDAL()),
                                                 new BusinessWord(new FakeDAL()),
                                                 new BusinessSetup(new FakeDAL()),
                                                 new BusinessUser(new FakeDAL()));
     Bl = new BL(new BusinessStatistic(new FakeDAL()),
                     new BusinessWord(new FakeDAL()),
                     new BusinessSetup(new FakeDAL()),
                     new BusinessUser(new FakeDAL()),
                     new FakeDAL(),
                     blDisplay);
     rd = new Random();
 }
예제 #2
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();
        }
예제 #3
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;
        }