RTS2D
include/ai/InfoManager.h
00001 #ifndef INFOMANAGER_H
00002 #include "Manager.h"
00003 #include "maxflowgraph.h"
00004 #include "Define.h"
00005 #define INFOMANAGER_H
00006 
00010 class InfoManager : public Manager {
00011 public:
00012     InfoManager(Game* game, Player* player);
00013     virtual ~InfoManager();
00014     void init();
00015     bool insertUnit(Unit* unit);
00016     bool removeUnit(Unit* unit);
00017     bool insertBuilding(Building* building);
00018     bool removeBuilding(Building* building);
00019     bool requestBuilding(int buildType);
00020     void makeGraph();
00021     void setTWeights();
00022     void setChokePoint();
00023     void setAttack();
00024     void run();
00025     std::pair<float,float> ourBase;
00026     std::pair<float,float> enemyBase;
00027     std::pair<float,float> chokePoint;
00028     std::pair<float,float> attackPoint;
00029     std::map<int,std::vector<Unit*>> ourUnitSet;
00030     std::map<int,std::vector<Building*>> ourBuildingSet;
00031     std::vector<int> buildOrder;
00032     Unit* worker;
00033     std::pair<float,float> buildLocation;
00034     int barracksProduction;
00035     bool findNewAttackPoint;
00036 
00037 protected:
00038 private:
00039     MaxflowGraph::node_id** nodes;
00040     MaxflowGraph *maxflowGraph;
00041 
00042 };
00043 #endif // INFOMANAGER_H
 Todos Classes Funções