2629881

Untitled

Aug 2nd, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. while (true)
  2.             {
  3.                 string input = Console.ReadLine();
  4.                 string command = string.Empty;
  5.                 command = input.Split(' ')[0];
  6.                
  7.                 switch (command)
  8.                 {
  9.                     case "/display":
  10.                         inventory.DisplayItems();
  11.                         Console.WriteLine();
  12.                         break;
  13.                     case "/add":
  14.                         string item = input.Split(' ')[1];
  15.                         //string item = Console.ReadLine();
  16.                         inventory.AddItem(item);
  17.                         break;
  18.                     case "/switch":
  19.                         break;
  20.                 }
  21.             }
Advertisement
Add Comment
Please, Sign In to add comment