protected:
void buildGraph();
void updateWorld();
- virtual std::string turn() = 0;
- void move(std::string location);
+ virtual std::string turn();
+ virtual void preGamePreparations(){};
+ virtual void move(std::string location);
+ virtual void sendInformation();
+ virtual void getInformation();
+ virtual void sendPlan();
+ virtual void getPlans();
+ virtual void vote();
+ virtual void voteResult();
void getPlayers();
std::list<std::string> shortestPath(const std::string& from, PlayerType type, const SPGoal& goal, bool reverse = false);
- __gnu_cxx::hash_map<std::string, Intersection> _intersections;
- __gnu_cxx::hash_map<std::string, Player> _players;
- __gnu_cxx::hash_map<std::string, int> _banks;
- std::map<int, std::string> _evidence;
- std::map<PlayerType, std::string> _playerTypeNames;
- std::map<std::string, PlayerType> _playerTypes;
- std::string _name;
- PlayerType _type;
- std::string _location;
- int _world;
- int _robbed;
- int _smell;
+ __gnu_cxx::hash_map<std::string, Intersection> _intersections;
+ __gnu_cxx::hash_map<std::string, Player> _players;
+ __gnu_cxx::hash_map<std::string, int> _banks;
+ std::map<int, std::string> _evidence;
+ std::map<PlayerType, std::string> _playerTypeNames;
+ std::map<std::string, PlayerType> _playerTypes;
+ std::string _name;
+ PlayerType _type;
+ std::string _location;
+ int _world;
+ int _robbed;
+ int _smell;
+ std::string _robberLocation;
+ std::string _copHq;
+ __gnu_cxx::hash_map<std::string, int> _winningPlans;
};
class SimpleSPGoal : public SPGoal{
std::string _to;
+ int _limit;
public:
- SimpleSPGoal(std::string to);
+ SimpleSPGoal(const std::string& to, int limit = 0);
int operator()(const SPInfo* node) const;
};