Пример #1
0
 public void SimulateDayOfGame(Player player, Stand stand, Inventory inventory, Day day, Customer customer, Weather weather)
 {
     for (int i = 0; i < 30; i++)
     {
         if (stand.cupsOfLemonadeLeftInPitcher <= 0)
         {
             UserInterface.NotEnoughSuppliesPrompt(player);
             i = 30;
             break;
         }
         else if (inventory.IceCount >= 0 && inventory.SugarCount >= 0 && inventory.LemonCount >= 0 && inventory.CupCount >= 0)
         {
             customer = new Customer();
             stand.DetermineIfCustomerBuys(customer, weather, player, inventory, day);
             if (stand.cupsOfLemonadeLeftInPitcher <= 0)
             {
                 stand.PourLemonadePitcher(inventory);
             }
         }
         else
         {
             UserInterface.NotEnoughSuppliesPrompt(player);
             break;
         }
     }
 }