BWAPI
|
00001 #pragma once 00002 #include "Micro/UnitsGroup.h" 00003 00004 typedef enum 00005 { 00006 SL_AND = 0, 00007 SL_OR = 1 00008 } SubgoalLogic; 00009 00015 class Subgoal 00016 { 00017 public: 00018 Subgoal(SubgoalLogic l, UnitsGroup* ug); 00019 Subgoal(SubgoalLogic l); 00020 Subgoal(const Subgoal& sg); 00021 virtual ~Subgoal(); 00022 //Accessors 00023 SubgoalLogic getLogic() const; 00024 void setUnitsGroup(UnitsGroup * ug); 00025 //Check accomplishment 00026 virtual bool isRealized() = 0; //Return if the subgoal is accomplished 00027 virtual void tryToRealize() = 0; //Give suggestions to the UnitsGroup 00028 virtual double distanceToRealize() = 0; //Return an estimated distance to accomplish the Subgoal 00029 //if the return value is negative, it means that the subgoal cannot give suggestions to the UnitsGroup 00030 protected: 00031 SubgoalLogic _logic; 00032 UnitsGroup* _unitsGroup; 00033 };