예제 #1
0
        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)}.");
        }
예제 #2
0
        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)}.");
        }
예제 #3
0
        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.");
            }
        }
예제 #4
0
        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)}.");
            }
        }
예제 #5
0
        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.");
            }
        }
예제 #6
0
 public static void ListNouns(World world)
 {
     Console.WriteLine($"Nouns are: {HelpfulMethods.TurnStringListIntoString(world.legitimateNouns)}.");
 }