コード例 #1
0
ファイル: Recipe.cs プロジェクト: voyager327/LemonadeStand
 public double PricePerCup()
 {
     UserInterface.DisplayMessage("Please set your recipe.");
     pricePerCup = UserInterface.GetUserInputInt("How Much would you charge per cup.");
     return(pricePerCup);
 }
コード例 #2
0
 private void DisplayRules()
 {
     UserInterface.DisplayRules();
 }
コード例 #3
0
 private void ChooseDuration()
 {
     howManyDays = UserInterface.ChooseDuration("How many days would you like the game to run?  (7-100)\n\n__", 7, 30);
 }
コード例 #4
0
 public double ChangePricePerCup()
 {
     recipe.pricePerCup = UserInterface.ChoosePricePerCup();
     return(recipe.pricePerCup);
 }
コード例 #5
0
 private void ClearConsole()
 {
     UserInterface.ClearConsole();
 }
コード例 #6
0
 public void PickSugarCubes()
 {
     recipe.amountOfSugarCubes = UserInterface.ChooseRecipeRatio("sugar");
 }
コード例 #7
0
 public void PickIceCubes()
 {
     recipe.amountOfIceCubes = UserInterface.ChooseRecipeRatio("ice cubes");
 }
コード例 #8
0
 public void PickLemons()
 {
     recipe.amountOfLemons = UserInterface.ChooseRecipeRatio("lemons");
 }
コード例 #9
0
 // member methods (CAN DO)
 public void ChooseName()
 {
     name = UserInterface.GetName();
 }
コード例 #10
0
        //Methods(CAN DO)
        public void GameMenu()//Needs to have option 4 updated to start the actual sale day
        {
            UserInterface.GameMenuText(player, days[whatDayIsIt - 1]);
            string userInputForMenu = Console.ReadLine().ToLower();

            switch (userInputForMenu)
            {
            case "1":
            case "show rules":
            case "rules":
                Console.Clear();
                UserInterface.DisplayRules();
                UserInterface.PressEnterToContinue();
                GameMenu();
                break;

            case "2":
            case "create recipe":
            case "recipe":
                Console.Clear();
                Console.WriteLine("Going to create a recipe for the day...");
                recipeCreated = true;
                UserInterface.PressEnterToContinue();
                RecipeCreation();
                GameMenu();
                break;

            case "3":
            case "go to store":
            case "store":
                Console.WriteLine("Heading to the store...");
                UserInterface.PressEnterToContinue();
                store.StoreVisit(player);
                GameMenu();
                break;

            case "4":
            case "start your day":
            case "day":
                WasARecipeCreated();
                break;

            case "5":
            case "skip today":
            case "skip":
                Console.WriteLine("Skipping Day...");
                UserInterface.PressEnterToContinue();
                break;

            case "6":
            case "exit game":
            case "exit":
                Console.WriteLine("Exiting Game...");
                UserInterface.PressEnterToContinue();
                System.Environment.Exit(0);
                break;

            default:
                Console.WriteLine("That was not proper input");
                UserInterface.PressEnterToContinue();
                GameMenu();
                break;
            }
        }
コード例 #11
0
 private void RecipeCreation()
 {
     pitcher = new Pitcher(player);
     UserInterface.DisplayCurrentInventoryAndMoney(player);
     SetLemonadePrice();
 }
コード例 #12
0
 public void ShowItems(Player player)
 {
     UserInterface.DisplayInventory(player, lemons.Count, sugarCubes.Count, iceCubes.Count, cups.Count);
 }