42 std::cout <<
"- Child: Age=" <<
age <<
" School=" <<
school << std::endl;
59 double minDist = std::numeric_limits<double>::infinity();
61 if (schools->size() == 0) {
64 std::list<AGSchool>::iterator it;
66 for (it = schools->begin(); it != schools->end(); ++it) {
67 if (it->acceptThisAge(
age) && it->getPlaces() > 0 && housePos.
distanceTo(it->getPosition()) < minDist) {
68 minDist = housePos.
distanceTo(it->getPosition());
87 return (
school !=
nullptr);