Beispiel #1
0
        public string GetDescription()
        {
            var list = new List <string>();

            list.Add($"The {Environment} {Name} Room (#{RoomNo}/{NumRooms})");
            if (HasExplored)
            {
                list.Add("You have already explored this area");
            }
            if (this.NumGold > 0)
            {
                list.Add($"There is {NumGold} gold pieces on the floor");
            }
            if (North == null && South == null && West == null && East == null)
            {
                list.Add("There are no areas to move to in any direction!");
            }
            else
            {
                list.Add(string.Format("There are areas to the {0}", string.Join(", ", GetDirections())));
            }
            if (HasExit)
            {
                list.Add("This room has an EXIT!");
            }
            if (HasEnemy)
            {
                list.Add(string.Format("The room has a {0}!", TheEnemy.Name));
                list.Add(string.Format(TheEnemy.GetDescription()));
            }
            if (HasPotion)
            {
                list.Add(string.Format("This Room has a potion!"));
            }
            return(string.Join("\r\n", list));
        }