コード例 #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 guest list from the room guest information
        /// </summary>
        public void InitializeGuestList()
        {
            _guestList = new GuestList();

            int guestNumber = 0;

            foreach (Room room in _hall.Rooms)
            {
                if (room.RoomGuest != null)
                {
                    _guestList.Guests[guestNumber] = room.RoomGuest;
                    guestNumber++;
                }
            }
        }