Example #1
0
        public void RunDay()
        {
            day.customers = new List <Customer>();
            day.weather.Getforecast();
            var recipe = new UserInterface();

            recipe.DisplayRecipe();
            var price = new UserInterface();

            price.DisplayStorePrices();
            var displayWallet = new UserInterface();

            displayWallet.DisplayWalletBalance(player);
            var displayInventory = new UserInterface();

            displayInventory.DisplayInventory(player);
            store.CheckPlayerSolvency(player);
            store.BuyLemons(player);
            store.BuyIce(player);
            store.BuySugar(player);
            store.SellItems(player);
            displayWallet.DisplayWalletBalance(player);
            displayInventory.DisplayInventory(player);
            player.MakeLemonade();
            player.SetLemonadePrice();
            player.validateLemonadePrice();
            day.weather.GetActualWeather();
            DetermineNumberOfCustomers();
            GetProfits();
            AddToWallet();
            Console.WriteLine("-----------------------------------------------------------------------------------------------------------");
        }
Example #2
0
        public void GoToTheStore(Store TheStore)
        {
            Console.WriteLine("Welcome to Walmart!");
            List <double> lemonsAndCost = TheStore.BuyLemons();

            PlayerInventory.lemons       += lemonsAndCost[0];
            PlayerInventory.currentMoney -= lemonsAndCost[1];
            PlayerInventory.moneySpent   += lemonsAndCost[1];

            List <double> sugarAndCost = TheStore.BuySugar();

            PlayerInventory.sugar        += sugarAndCost[0];
            PlayerInventory.currentMoney -= sugarAndCost[1];
            PlayerInventory.moneySpent   += sugarAndCost[1];

            List <double> cupsAndCost = TheStore.BuyGlasses();

            PlayerInventory.cups         += cupsAndCost[0];
            PlayerInventory.currentMoney -= cupsAndCost[1];
            PlayerInventory.moneySpent   += cupsAndCost[1];

            List <double> iceAndCost = TheStore.BuyIce();

            PlayerInventory.ice          += iceAndCost[0];
            PlayerInventory.currentMoney -= iceAndCost[1];
            PlayerInventory.moneySpent   += iceAndCost[1];
        }
Example #3
0
 public void BuyItems(Store store, Inventory inventory)
 {
     store.BuyLemons(inventory);
     store.BuySugar(inventory);
     store.BuyIce(inventory);
     store.BuyCups(inventory);
     Console.Clear();
     inventory.DisplayInventory();
     inventory.CheckCash(inventory);
     Console.Clear();
 }
Example #4
0
 //Member Methods
 public void StartGame()
 {
     playerOne.GetPlayerName();
     User_Interface.DisplayMessage("Welcome To The Game: " + playerOne.name);
     weatherTodayResult = weatherToday.TodaysWeather();
     DisplayWeatherToday(weatherTodayResult);
     playerMoney            = money.DisplayMoneyInWallet();
     getSupplies            = buySupplies.BuyLemon();
     getSupplies            = buySupplies.BuyIce();
     getSupplies            = buySupplies.BuySuger();
     getSupplies            = buySupplies.BuyCup();
     pricePerCup            = chargePrice.InputPrice();
     numberOfCustomersToday = todaysCustomer.CustomersToday(weatherTodayResult);
     buyingCustomersWeather = todaysCustomer.DetermineWillBuyWeather(weatherTodayResult);
     buyTodayWeatherPrice   = todaysCustomer.DetermineWillBuyPrice(pricePerCup);
 }
Example #5
0
 //member methods (Can Do)
 public void RunGame()
 {
     UserInterface.DisplayRules();
     UserInterface.DisplayWeatherForecast(days);
     while (day.numberOfDays <= 7)
     {
         day.CreateCustomer();
         player.recipe.SetRecipe();
         UserInterface.DisplayStock();
         store.BuyCups();
         store.BuyLemon();
         store.BuySugar();
         store.BuyIce();
         Console.WriteLine("Here is your money leftover! " + player.wallet.Money);
         Console.ReadLine();
         player.pitcher.DisplayPitcherCups(player);
         DisplayActualWeather();
         day.ChoiceToBuy(weather, player);
         Console.WriteLine("Here is your amount of money after the day! " + player.wallet.Money);
         Console.ReadLine();
     }
 }