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;
- namespace GameEdition3
- {
- class Data
- {
- private string strInstructions;
- private string strTitleMenu;
- public string result = String.Empty;
- public string Information()
- {
- strInstructions = "Instructions: \n \n" +
- "Press 1 on your keyboard to add an item to your inventory \nPress 2 on your keyboard to Display All Items. \nPress 3 on your keyboard to choose a random Item \nPress 4 to exit the program"
- + " \n \nPress Backspace to go back to the menu";
- return strInstructions;
- }
- public string TitleMenu()
- {
- strTitleMenu = "1. Add New Item\n2. Display All Items \n3. Random Item \n4. Quit " +
- "\nPress I for instructions";
- return strTitleMenu;
- }
- public string myFunction()
- {
- string input = Console.ReadLine();
- switch (input)
- {
- case "Warhammer":
- result = "Warhammer";
- return "Warhammer is selected";
- case "Heavy Armor":
- result = "Heavy Armor";
- return "Heavy Armor is selected";
- case "Boots":
- result = "Boots";
- return "Boots is selected";
- case "Sword":
- result = "Sword";
- return "Sword is selected";
- default:
- return "Input not reconized, please choose another item";
- }
- }
- public Data()
- { }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement