public static void ListItems(World world) { List <Item> itemList = world.GetLocation(world.GetPlayer().GetLocationName()).GetItemsAtLocation(); //Create a list of npcs at the location. Make sure to exclude Trixie. int numItems = itemList.Count; if (itemList.Count() > 0) { Console.WriteLine($"There {HelpfulMethods.IsOrAre(numItems)} {HelpfulMethods.TurnItemListIntoString(itemList)} here."); } }
public static void ListCreatures(World world) { List <Creature> creatureList = world.GetLocation(world.GetPlayer().GetLocationName()).GetCreaturesAtLocation(); //Create a list of npcs at the location. Make sure to exclude Trixie. int numCreatures = creatureList.Count; if (creatureList.Count() == 1) { Console.WriteLine("There's nopony else here."); } else { Console.WriteLine($"{HelpfulMethods.TurnCreatureListIntoString(creatureList)} {HelpfulMethods.IsOrAre(numCreatures - 1)} here."); } }