コード例 #1
0
 // TODO Sprint 3 Mod 05b - modify the ConsoleView constructor to accept the treasure object
 /// <summary>
 /// constructor to create the console view, send all major data objects
 /// </summary>
 /// <param name="myPlayer">active player object</param>
 /// <param name="hall">current hall object</param>
 /// <param name="hall">current guest list object</param>
 public ConsoleView(Player myPlayer, Hall hall, GuestList guests, StaffList staff, Treasure treasure)
 {
     _myPlayer = myPlayer;
     _hall = hall;
     _guestList = guests;
     _staffList = staff;
     _treasure = treasure;
     InitializeConsoleWindow();
 }
コード例 #2
0
        /// <summary>
        /// initialize the staff list from the room staff information
        /// </summary>
        public void InitializeStaffList()
        {
            _staffList = new StaffList();

            int staffNumber = 0;

            foreach (Room room in _hall.Rooms)
            {
                if (room.RoomStaff != null)
                {
                    _staffList.Staff[staffNumber] = room.RoomStaff;
                    staffNumber++;
                }
            }
        }