public void AddResource(Duck animal, Farm farm)
 {
     if (_animals.Count < _capacity)
     {
         _animals.Add(animal);
     }
     else
     {
         ChooseDuckHouse.atCapacity = true;
         ChooseDuckHouse.CollectInput(farm, animal);
     }
 }
 public void AddResource(Farm farm, Duck animal)
 {
     if (_animals.Count < _capacity)
     {
         _animals.Add(animal);
         ChooseDuckHouse.UserTriedToSelectAFullFacility = false;
     }
     else
     {
         ChooseDuckHouse.UserTriedToSelectAFullFacility = true;
         ChooseDuckHouse.CollectInput(farm, animal);
     }
 }
示例#3
0
 public void AddResource(Farm farm, Duck bird)
 {
     if (_ducks.Count < _capacity)
     {
         _ducks.Add(bird);
     }
     else
     {
         Console.WriteLine("**** That facility is not large enough ****");
         Console.WriteLine("****     Please choose another one     ****");
         ChooseDuckHouse.CollectInput(farm, bird);
     }
 }