X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=bot%2Fbot.h;h=d01ec114853e118456235efea29b4650d8d268c5;hb=0fbd9bca7cd5cd937f306753f895cfe642dd9e6d;hp=1c40b44214d8ae1eef0277e7796d37abc26c0d32;hpb=f4121d29718ebe595283200700956369776dbdca;p=icfp05.git diff --git a/bot/bot.h b/bot/bot.h index 1c40b44..d01ec11 100644 --- 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,11 +82,13 @@ class Bot { void updateWorld(); virtual std::string turn() = 0; void move(std::string location); + void getPlayers(); std::list shortestPath(const std::string& from, PlayerType type, const SPGoal& goal); __gnu_cxx::hash_map _intersections; __gnu_cxx::hash_map _players; __gnu_cxx::hash_map _banks; + std::map _evidence; std::map _playerTypeNames; std::map _playerTypes; std::string _name; @@ -108,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