Esempio n. 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)}.");
        }
Esempio n. 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)}.");
        }
Esempio n. 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.");
            }
        }
Esempio n. 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)}.");
            }
        }
Esempio n. 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.");
            }
        }
Esempio n. 6
0
 public static void ListNouns(World world)
 {
     Console.WriteLine($"Nouns are: {HelpfulMethods.TurnStringListIntoString(world.legitimateNouns)}.");
 }