public static void ListCommands(World world) { //List<String> stringList = new List<string>(DataStorage.legitimateCommands); //Console.WriteLine($"Commands are: {HelpfulMethods.TurnStringListIntoString(stringList)}"); Console.WriteLine($"Commands are: {HelpfulMethods.TurnStringListIntoString(world.legitimateCommands)}."); }
public static void GetExits(World world) { Location loc = world.GetLocation(world.GetPlayer().GetLocationName()); List <string> exits = loc.GetExits(); Console.Write($"Exits are: {HelpfulMethods.TurnStringListIntoString(exits)}."); }
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 ShowInventory(World world) { List <Item> items = world.GetInventory(); if (items.Count() == 0) { Console.WriteLine("You're not carrying anything."); } else { Console.WriteLine($"You are carrying: {HelpfulMethods.TurnItemListIntoString(items)}."); } }
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."); } }
public static void ListNouns(World world) { Console.WriteLine($"Nouns are: {HelpfulMethods.TurnStringListIntoString(world.legitimateNouns)}."); }