예제 #1
0
        void ShopListWeapons()
        {
            var count = 1;

            Console.WriteLine("---Weapons For Sale---");
            foreach (var weapon in WeaponsList.OrderBy(x => x.Name))
            {
                Console.WriteLine($"w{count} {weapon.Name}, {weapon.OriginalValue}, {weapon.ResellValue}");
                ItemCatalog.Add($"w{count}", weapon);
                count++;
            }
            Console.WriteLine("");
        }
예제 #2
0
        public void ListWeapons()
        {
            Console.WriteLine("Weapons:");
            var count = 1;

            foreach (var weapon in WeaponsList.OrderBy(w => w.OriginalValue))
            {
                Console.WriteLine($"w{count}. {weapon.Name} - Original Value: {weapon.OriginalValue}, Resell Value: {weapon.ResellValue}");
                ItemCatalog.Add($"w{count}", weapon);
                count++;
            }
            Console.WriteLine();
        }