Esempio n. 1
0
 public void AddResource(Chicken animal, Farm farm)
 {
     if (_animals.Count < _capacity)
     {
         _animals.Add(animal);
     }
     else
     {
         ChooseChickenHouse.atCapacity = true;
         ChooseChickenHouse.CollectInput(farm, animal);
     }
 }
Esempio n. 2
0
 public void AddResource(Farm farm, Chicken bird)
 {
     if (_chickens.Count < _capacity)
     {
         _chickens.Add(bird);
     }
     else
     {
         Console.WriteLine("**** That facility is not large enough ****");
         Console.WriteLine("****     Please choose another one     ****");
         ChooseChickenHouse.CollectInput(farm, bird);
     }
 }
Esempio n. 3
0
 public void AddResource(Farm farm, Chicken animal)
 {
     if (_animals.Count < _capacity)
     {
         _animals.Add(animal);
         ChooseChickenHouse.UserTriedToSelectAFullFacility = false;
     }
     else
     {
         ChooseChickenHouse.UserTriedToSelectAFullFacility = true;
         ChooseChickenHouse.CollectInput(farm, animal);
     }
 }