예제 #1
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.");
            }
        }
예제 #2
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)}.");
            }
        }