Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace inventory
- {
- class Program
- {
- static void Main(string[] args)
- {
- Inventory inventory = new Inventory();
- Console.WriteLine("Wpisz komende /add /switch /display");
- // test
- inventory.DisplayItems();
- Console.WriteLine();
- // test
- while (true)
- {
- string command = Console.ReadLine();
- switch (command)
- {
- case "/display":
- {
- inventory.DisplayItems();
- Console.WriteLine();
- }
- break;
- case "/add":
- {
- string item = Console.ReadLine(); ;
- inventory.AddItem(item);
- Console.WriteLine("{0} has been added to your inventory", item);
- inventory.DisplayItems();
- }
- break;
- case "/switch":
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement