]> ruin.nu Git - icfp05.git/blobdiff - botsrc/bot.h
banks with guarding cops is BAD.. and public inheritance is more useful than private
[icfp05.git] / botsrc / bot.h
index ee236ee1e0519056ad9d70cb0aef978d0538775b..a5f469b580becc9b390b20b7dbbd9ca11ce92e03 100644 (file)
@@ -67,8 +67,8 @@ struct SPInfo{
 
 class SPGoal{
        public:
-       virtual ~SPGoal(){}
-       virtual int operator()(const SPInfo* node) const = 0;
+               virtual ~SPGoal(){}
+               virtual int operator()(const SPInfo* node) const = 0;
 };
 
 class Bot {
@@ -102,12 +102,12 @@ class Bot {
 
 class SimpleSPGoal : public SPGoal{
        std::string _to;
-       SimpleSPGoal(std::string to);
        public:
+       SimpleSPGoal(std::string to);
        int operator()(const SPInfo* node) const;
 };
 
-class FindPlayer : SPGoal{
+class FindPlayer : public SPGoal{
        int _limit;
        const __gnu_cxx::hash_map<std::string, Player>& _players;
        PlayerType _type;