]> ruin.nu Git - icfp05.git/blobdiff - robbersrc/robber.cpp
add the number of connecting streets as a factor in the goodness of an interconnection
[icfp05.git] / robbersrc / robber.cpp
index 247a00e6de14d8a1e7a47fe52c92f0e14c552aef..b2a32d44a8081f90dfbac4691ea6312475911c2c 100644 (file)
@@ -23,8 +23,8 @@ string Robber::turn(){
                        continue;
                }
                //cerr << "Looking at street: " << street->first << endl;
-               double goodness = 0;
                Intersection& conInter = _intersections[street->first];
+               double goodness = conInter.connections.size();
 
                list<string> closestFootCop = shortestPath(street->first, cop_foot, FindPlayer(_players, cop_foot, 6), true);
                unsigned int closestCop = closestFootCop.size();