Esempio n. 1
0
void CityUpdater::freeRoad(){
    //std::cout<<"Freeing "<<std::endl;
    getAdjacencyList();
    Visitor* visitorPtr;
    std::vector<Location> path;
    for (int i=0; i<cityMap->getMaxVisitors(); i++){
        if ((visitorPtr = cityMap->getVisitor(i)) && (visitorPtr->isOnStandby())){
            path.clear();
            generateFullPath(visitorPtr->getLoc(), visitorPtr->getEndLoc(), path);
            //std::cout<<path.size()<<std::endl;
            visitorPtr->setPath(path);
        }
    }
}