public Wagon GetAvailableWagon(Animal animal) { foreach (Wagon wagon in wagons) { if (wagon.CanAnimalBeAdded(animal)) { return(wagon); } } Wagon newWagon = new Wagon(); wagons.Add(newWagon); return(newWagon); }
public void AddWagonToTrain(Wagon wagon) { wagons.Add(wagon); }