41 std::cout <<
"- Child: Age=" <<
age <<
" School=" <<
school << std::endl;
58 double minDist = std::numeric_limits<double>::infinity();
60 if (schools->size() == 0) {
63 std::list<AGSchool>::iterator it;
65 for (it = schools->begin(); it != schools->end(); ++it) {
66 if (it->acceptThisAge(
age) && it->getPlaces() > 0 && housePos.
distanceTo(it->getPosition()) < minDist) {
67 minDist = housePos.
distanceTo(it->getPosition());
86 return (
school !=
nullptr);