]> ruin.nu Git - icfp05.git/blobdiff - robber/robber.cpp
some restructuring
[icfp05.git] / robber / robber.cpp
index f586f6ae3267a4e95664d54c4c8ec2e9c36d8d38..dbb287a4d760b5bb2dd231497778866318fb24a4 100644 (file)
@@ -7,24 +7,6 @@
 using namespace std;
 using namespace __gnu_cxx;
 
-struct FindPlayer : SPGoal{
-       int _limit;
-       const hash_map<string, Player>& _players;
-       PlayerType _type;
-       FindPlayer(const hash_map<string, Player>& players, PlayerType type, int limit = 0) : _players(players), _type(type), _limit(limit){}
-       int operator()(const SPInfo* node) const{
-               if (_limit > 0 && node->cost >= _limit)
-                       return -1;
-               for(hash_map<string, Player>::const_iterator player = _players.begin();
-                               player != _players.end(); ++player){
-                       if (player->second.type == _type && player->second.location == node->name){
-                               return 1;
-                       }
-               }
-               return 0;
-       }
-};
-
 string Robber::turn(){
        hash_map<string,double> streets;
        Intersection& inter = _intersections[_location];