Пример #1
0
 public Game()
 {
     lemonadeStand = new Booth();
     day           = new Day(random);
     menu          = new Menu();
     player        = new Player();
 }
Пример #2
0
 public void NextDay(Booth lemonadeStand, Inventory inventory)
 {
     dayCounter++;
     //Console.WriteLine("On to the NEXT DAY!!!");
     lemonadeStand.pitcher.ResetCupsPerDaySold();
     inventory.ResetDailyProfit();
 }
Пример #3
0
        public void MainMenuAction(Day day, Player player, Booth lemonadeStand)
        {
            switch (mainMenuOutput)
            {
            case 1:
                // view inventory
                player.DisplayInventory();
                break;

            case 2:
                // purchase inventory
                player.DisplayInventory();
                player.AskForPurchase(player);
                break;

            case 3:
                // set recipe
                lemonadeStand.pitcher.recipe.SetRecipe(player.inventory);
                player.inventory.SetPricePerGlassSold();
                player.inventory.CheckRecipeIngredientsInventory(lemonadeStand.pitcher.recipe);
                lemonadeStand.OpenBooth();
                break;

            case 4:
                // print sales report
                DisplayMainMenu(day, player);
                break;

            case 5:
                //clear console
                Console.Clear();
                DisplayMainMenu(day, player);
                break;

            default:
                Console.WriteLine("\nPlease select from the available options!");
                DisplayMainMenu(day, player);
                break;
            }
        }
Пример #4
0
 public void PrintDailySalesReport(Booth lemonadeStand, Inventory inventory)
 {
     Console.WriteLine("\n>>>>>DAILY SALES REPORT<<<<< ");
     Console.WriteLine("You sold {0} cups of lemonade for a profit of ${1:0.00}!",
                       lemonadeStand.pitcher.GetTotalCupsSold(), inventory.GetTotalDailyProfit());
 }