struct SPInfoComp{
bool operator()(const SPInfo* v1, const SPInfo* v2){
return v1->cost > v2->cost;
}
};
struct SPInfoComp{
bool operator()(const SPInfo* v1, const SPInfo* v2){
return v1->cost > v2->cost;
}
};
-std::list<std::string> Bot::shortestPath(const std::string& from, const std::string& to, PlayerType type){
+std::list<std::string> Bot::shortestPath(const std::string& from, PlayerType type, const SPGoal& goal){
+
+ //cerr << "New shortest path from: " << from << endl;
priority_queue<SPInfo*, vector<SPInfo* >, SPInfoComp > pq;
hash_map<string,SPInfo> nodes;
priority_queue<SPInfo*, vector<SPInfo* >, SPInfoComp > pq;
hash_map<string,SPInfo> nodes;
//copy(w.begin(), w.end(), ostream_iterator<string>(cerr, " : "));
//copy(w.begin(), w.end(), ostream_iterator<string>(cerr, " : "));
bool hascar = type == cop_car;
if ( (hascar && (street->second == car || street->second == both)) ||
(!hascar && (street->second == foot || street->second == both))){
bool hascar = type == cop_car;
if ( (hascar && (street->second == car || street->second == both)) ||
(!hascar && (street->second == foot || street->second == both))){