public void GamePlay()
        {
            day       = new Day(random);
            random    = new Random();
            inventory = new Inventory();
            player    = new Player();
            store     = new Store();
            weather   = new Weather();
            recipe    = new Recipe();
            PlayerInfo(player);
            int AWeekLong = 7;

            for (AWeekLong = 0; AWeekLong < 7; AWeekLong++)
            {
                WeatherDisplay();
                PlayerInventory(inventory);
                BuyItems(store, inventory);
                CreateRecipe(recipe);
                day.SetPrice();
                Console.Clear();
                Console.WriteLine("Ready, press enter to begin the day.");
                Console.ReadLine();
                day.GenerateCustomers(random, weather);
                inventory.RemoveCups(day);
                day.CalculateRevenue(inventory, day);
                GetProfit(inventory);
            }
            EndGame();
        }
Exemple #2
0
 public void SellLemonade()
 {
     today.GenerateCustomers();
     for (int i = 0; i < today.customerList.Count; i++)
     {
         //lemonadeStand.SellignLemonadeToMen();
         //lemonadeStand.SellingLemonadeToChildren();
         //lemonadeStand.SellingLemonadeToWomen();
         lemonadeStand.myLemonadeRecipe.cupsPerPithcer--;
         CheckSuplies();
         lemonadeStand.standInventory.cups--;
         CheckSuplies();
         lemonadeStand.standInventory.money += myRecipe.lemonadePrice;
         lemonadeStand.cupsBoughtToday++;
     }
 }
Exemple #3
0
        public virtual void GameLogic()
        {
            Console.WriteLine("Press ENTER TO START");
            Console.ReadLine();
            for (int i = 0; i < daysToPlay; i++)
            {
                ResetDailyValues();
                currentDayNo = i + 1;

                newDay.CreateDayWeather();
                newDay.GenerateCustomers(newDay.dayWeather);
                DisplayDayInventoryScreen();

                myStore.SellCups(player1);
                Console.Clear();
                DisplayDayInventoryScreen();

                myStore.SellLemons(player1);
                Console.Clear();
                DisplayDayInventoryScreen();

                myStore.SellSugar(player1);
                Console.Clear();
                DisplayDayInventoryScreen();

                myStore.SellIce(player1);
                Console.Clear();
                DisplayDayInventoryScreen();

                player1.CreateRecipe(myStore);
                Console.Clear();
                DisplayDayInventoryScreen();

                player1.SetCupPrice();
                Console.Clear();
                DisplayDayInventoryScreen();

                newDay.SellLemonade(player1);
                Console.WriteLine($"Total {newDay.customersDidBuy} customers bought your lemonade today");
                newDay.CalculateProfit(player1);
                DisplayDailyStats();
                Console.ReadLine();
            }
        }
Exemple #4
0
 public void SellLemonade()
 {
     today.GenerateCustomers();
     lemonadeStand.MakePitcher();
     for (int i = 0; i < today.customerList.Count; i++)
     {
         lemonadeStand.totalCupsPurchased++;
         lemonadeStand.theStore.cupCounter--;
         lemonadeStand.wallet += lemonadeStand.lemonadePrice;
         lemonadeStand.cupsPurchasedToday++;
         if (lemonadeStand.cupsPurchasedToday == lemonadeStand.cupsPerPitcher)
         {
             lemonadeStand.MakePitcher();
             lemonadeStand.cupsPurchasedToday = 0;
         }
         if (lemonadeStand.theStore.cupCounter == 0)
         {
             Console.WriteLine("No more cups remaining");
             EndDay();
         }
     }
 }