]> ruin.nu Git - icfp05.git/blobdiff - bot/bot.h
tuning and restructuring
[icfp05.git] / bot / bot.h
index efe373f77ed5c26890e19d2cd2360310636559fd..d01ec114853e118456235efea29b4650d8d268c5 100644 (file)
--- a/bot/bot.h
+++ b/bot/bot.h
@@ -70,17 +70,6 @@ struct SPGoal{
        virtual int operator()(const SPInfo* node) const = 0;
 };
 
-struct SimpleSPGoal : public SPGoal{
-       std::string _to;
-       SimpleSPGoal(std::string to):_to(to){};
-       ~SimpleSPGoal(){}
-       int operator()(const SPInfo* node) const{
-               if (node->name == _to)
-                       return 1;
-               return 0;
-       }
-};
-
 class Bot {
        public:
                Bot(const std::string& name, PlayerType type);
@@ -93,6 +82,7 @@ class Bot {
                void updateWorld();
                virtual std::string turn() = 0;
                void move(std::string location);
+               void getPlayers();
                std::list<std::string> shortestPath(const std::string& from, PlayerType type, const SPGoal& goal);
 
        __gnu_cxx::hash_map<std::string, Intersection> _intersections;
@@ -109,4 +99,15 @@ class Bot {
        int _smell;
 };
 
+struct SimpleSPGoal : public SPGoal{
+       std::string _to;
+       SimpleSPGoal(std::string to):_to(to){};
+       ~SimpleSPGoal(){}
+       int operator()(const SPInfo* node) const{
+               if (node->name == _to)
+                       return 1;
+               return 0;
+       }
+};
+
 #endif