]> ruin.nu Git - icfp05.git/commitdiff
add the number of connecting streets as a factor in the goodness of an interconnection
authorMichael Andreen <harv@ruin.nu>
Sat, 9 Jul 2005 23:00:19 +0000 (23:00 +0000)
committerMichael Andreen <harv@ruin.nu>
Sat, 9 Jul 2005 23:00:19 +0000 (23:00 +0000)
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();