Beispiel #1
0
 public void RunGame()
 {
     day.CreateCustomers();
     RandomNumber();
     DisplayWelcome();
     day.SellLemonade(player);
 }
Beispiel #2
0
        public void NewDay(int dayNum)
        {
            Day day = new Day(dayNum);

            day.GetWeather();      // new weather
            day.CreateCustomers(); // new customers
            days.Add(day);
        }
 public void SellLemonade()
 {
     thisDay.CreateCustomers();
     theStand.MakeAPitcher();
     for (int i = 0; i < thisDay.createCustomers.Count; i++)
     {
         theStand.cupsBoughtToday++;
         inventory.cups--;
         moneyMade += theStand.priceOfLemonade;
         if (theStand.cupsBoughtToday == theStand.cupsPerPitcher)
         {
             theStand.MakeAPitcher();
             theStand.cupsBoughtToday = 0;
         }
     }
 }
Beispiel #4
0
        public void RunGame()
        {
            for (int i = 1; i <= daysOfGameplay; i++)
            {
                day           = new Day(random);
                day.DayNumber = i;
                UserInterface.DisplayForecast(day);


                day.CreateCustomers(random);
                foreach (Player player in players)
                {
                    UserInterface.DisplayInventory(player);
                    RunStore();
                    UserInterface.DisplayWeather(day);
                    RunRecipe();
                    RunDay();
                    UserInterface.DisplayDayResults(player, day);
                    player.Inventory.BeginningDayMoney = player.Inventory.AvailableMoney;
                }
            }
        }