Exemplo n.º 1
0
        internal override string ReturnRoom()
        {
            SecretRoom secretRoom = LoadRoom();
            string     result     = ("Room: " + secretRoom.RoomDescription + " Exits from this room include: " + secretRoom.Exits.Keys + " " + secretRoom.ReadRoomInventory(secretRoom));

            return(result);
        }
Exemplo n.º 2
0
        internal SecretRoom LoadRoom()
        {
            SecretRoom secretRoom = new SecretRoom();

            secretRoom.RoomDescription = "This room is super secret!";
            secretRoom.Exits           = new Dictionary <string, Room>()
            {
                { "West", new Entry() }
            };
            return(secretRoom);
        }
Exemplo n.º 3
0
        public string ReadRoomInventory(SecretRoom room)
        {
            string result = "This room does not contain any items";

            if (room.RoomInventory != null)
            {
                result = "This room contains: ";
                foreach (var item in room.RoomInventory)
                {
                    result = result + item + "";
                }
            }

            return(result);
        }