BWAPI
|
00001 #ifndef __PFMANAGER_H__ 00002 #define __PFMANAGER_H__ 00003 00004 #include <BWAPI.h> 00005 #include "BaseAgent.h" 00006 00007 using namespace BWAPI; 00008 using namespace std; 00009 00020 class PFManager { 00021 00022 private: 00023 PFManager(); 00024 static PFManager* instance; 00025 static bool instanceFlag; 00026 00027 float getAttackingUnitP(BaseAgent* agent, int cX, int cY, bool defensive); 00028 float getMedicUnitP(BaseAgent* agent, int cX, int cY); 00029 bool checkWait(BaseAgent* agent, TilePosition goal); 00030 00031 Unit* checkTarget(BaseAgent* agent); 00032 00033 int checkRange; 00034 int stepSize; 00035 int mapW; 00036 int mapH; 00037 00038 public: 00040 ~PFManager(); 00041 00043 static PFManager* getInstance(); 00044 00047 void computeAttackingUnitActions(BaseAgent* agent, TilePosition goal, bool defensive); 00048 00051 void computeAttackingUnitActions(BaseAgent* agent, TilePosition goal, bool defensive, bool forceMove); 00052 00055 void computeMedicUnitActions(BaseAgent* agent); 00056 00059 bool moveToGoal(BaseAgent* agent, TilePosition goal); 00060 00061 }; 00062 00063 #endif