Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- Console.WriteLine("Welcome To Food Hut");
- Console.ReadLine();
- // if readline equals to /help then display some help text.
- // if /food command is typed, read first argument after /food Pizza, -t TheTopping
- // and -p ForWhatToDrink
- // and then display, 'So you would like a Pizza with Pepperoni and Pepsi to drink?'
- }
- static void Main(string[] args)
- {
- Arguments cmdline = new Arguments(args);
- Console.WriteLine(cmdline["name"]);
- }
- string input = Console.ReadLine();
- if (input == "/help") { }
- else if (input.StartsWith("/food")) { }
- else { //... }
- Food:
- 1) Tofu
- 2) Tempeh
- 3) Seitan
- 4) Soup
- Choice (1-4)? [users input]
- Drink:
- 1) Pepsi
- 2) Coffee
- 3) Water
- 4) Tea
- 5) Juice
- Choice (1-5)? [users input]
- input = Console.ReadLine();
- string[] commands = input.Split(' ');
- if(commands[0] == "/food")
- {
- if(commands[1] == "Pizza");
- .....
- }
Add Comment
Please, Sign In to add comment