コード例 #1
0
        /// <summary>
        /// Sets up the game so it can be played.
        /// </summary>
        public void SetupGame()
        {
            //Initialize the View
            InitializeView();

            //  If main menu returns true for continue, go on with the game.
            if (MainMenu())
            {
                //  Create player
                CreatePlayer();

                //  Pass player to view
                _view.InitializePlayerReference(_player);

                //  Create building
                _building = new Building();

                //  Pass building to view
                _view.InitializeBuildingReference(_building);

                //  Create StaffList
                _staff = new StaffList();
                _staff.InitializeStaff();

                //  Pass StaffList to view
                _view.InitializeStaffReference(_staff);

                //  Create GuardList
                _guards = new GuardList();
                _guards.InitializeGuards();

                //  Pass GuardList to view
                _view.InitializeGuardReference(_guards);

                //  Play the game
                PlayGame();
            }

            //  Application Closes at this point
        }
コード例 #2
0
        /// <summary>
        /// Sets up the game so it can be played.
        /// </summary>
        public void SetupGame()
        {
            //Initialize the View
            InitializeView();

            //  If main menu returns true for continue, go on with the game.
            if (MainMenu())
            {
                //  Create player
                CreatePlayer();

                //  Pass player to view
                _view.InitializePlayerReference(_player);

                //  Create building
                _building = new Building();

                //  Pass building to view
                _view.InitializeBuildingReference(_building);

                //  Create StaffList
                _staff = new StaffList();
                _staff.InitializeStaff();

                //  Pass StaffList to view
                _view.InitializeStaffReference(_staff);

                //  Create GuardList
                _guards = new GuardList();
                _guards.InitializeGuards();

                //  Pass GuardList to view
                _view.InitializeGuardReference(_guards);

                //  Play the game
                PlayGame();
            }

            //  Application Closes at this point
        }
コード例 #3
0
 /// <summary>
 /// Creates the reference to the staffList for the ConsoleView
 /// </summary>
 /// <param name="player"></param>
 public void InitializeStaffReference(StaffList staff)
 {
     _myStaff = staff;
 }
コード例 #4
0
ファイル: ConsoleView.cs プロジェクト: Voidable/QuestGame-TB
 /// <summary>
 /// Creates the reference to the staffList for the ConsoleView
 /// </summary>
 /// <param name="player"></param>
 public void InitializeStaffReference(StaffList staff)
 {
     _myStaff = staff;
 }