- //cerr << "Cop " << closestCop << " intersections away." << endl;
- if (closestCop > 0 && closestCop < 3)
- continue;
-
- priority_queue<double> banks;
- for(hash_map<string,int>::const_iterator bank = _banks.begin();
- bank != _banks.end(); ++bank){
- //cerr << "Handling bank at: " << bank->first << endl;
- if (bank->second > 0){
- list<string> cop = shortestPath(bank->first, cop_car, FindPlayer(_players, cop_car, 3), true);
- if (cop.size() > 0)
- continue;
- else{
- cop = shortestPath(bank->first, cop_foot, FindPlayer(_players, cop_foot, 3), true);
- if (cop.size() > 0)
- continue;
- }
- list<string> l = shortestPath(street->first, _type, SimpleSPGoal(bank->first));
- if (l.size() < 1)
- continue;
- //list<string>::iterator i = l.begin();
- //++i;
- banks.push(bank->second/(pow(l.size(),4.0)));
- }
- }
- //sort(banks.begin(),banks.end(),greater<double>());
+ list<string> closestFootCop = shortestPath(to, cop_foot, FindPlayer(_players, cop_foot, 10), true);
+ unsigned int closestCop = closestFootCop.size();
+ bool copInCar = false;
+ //cerr << "Cop on fot " << closestCop << " intersections away." << endl;