예제 #1
0
 /// <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)
 {
     _myPlayer = myPlayer;
     _hall = hall;
     _guestList = guests;
     _staffList = staff;
     InitializeConsoleWindow();
 }
        /// <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++;
                }
            }
        }