]> ruin.nu Git - icfp05.git/blobdiff - copsrc/cop.cpp
added license
[icfp05.git] / copsrc / cop.cpp
index 2a8002293094ddca3436f249487d2c9c25a9ac68..411c11122365b89e0d16a5c3fa01fcd9b765357d 100644 (file)
@@ -216,15 +216,16 @@ void Cop::sendPlan(){
                }
                if (positions.size() > 0){
                        _robberLocation = positions.top().second;
-                       cerr << "Sending myself to: " << _robberLocation << ", probability of robber: " << positions.top().first << endl;
+                       //cerr << "Sending myself to: " << _robberLocation << ", probability of robber: " << positions.top().first << endl;
                }
                for (int i = 0; i < 2 && positions.size() > 1; ++i ){
                        positions.pop();
                        locations.push_back(positions.top().second);
-                       cerr << "Sending another cop to: " << locations.back() << ", probability of robber: " << positions.top().first << endl;
+                       //cerr << "Sending another cop to: " << locations.back() << ", probability of robber: " << positions.top().first << endl;
                }
        }else{
                locations.push_back(_robberLocation);
+               locations.push_back(_robberLocation);
        }
        if (!_robberLocation.empty()){
                //cerr << "Robber found at " << _robberLocation << endl;
@@ -248,7 +249,7 @@ void Cop::sendPlan(){
                                }
                        }
                        if (!cop.empty()){
-                               cerr << "Sending " << cop << " to " << locations.front() << endl;
+                               //cerr << "Sending " << cop << " to " << locations.front() << endl;
                                _copTargets[cop].first = locations.front();
                                busyCops.push_back(cop);
                        }
@@ -296,3 +297,5 @@ int main(){
 
        return 0;
 }
+
+#include "../botsrc/shortestPath.cpp"