Beispiel #1
0
 public Game(IActionManager bl, ISetting setting)
 {
     _bl = bl;
     _rd = new Random();
     _player = new Player(_bl, setting, _rd);
 }
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;
        }