|
BWAPI
|
00001 #ifndef HYDRALISKMANAGER_H_ 00002 #define HYDRALISKMANAGER_H_ 00003 #include <Common.h> 00004 #include <BWAPI.h> 00005 #include "MicroManager.h" 00006 00007 class HydraliskManager : public MicroManager 00008 { 00009 00010 public: 00011 00012 HydraliskManager(); 00013 virtual ~HydraliskManager(){} 00014 00015 void executeMicro(const UnitVector & targets); 00016 00017 private: 00018 00019 double speed, cooldown, range; 00020 std::vector<GroundThreat> threats; 00021 00022 BWAPI::Unit * chooseTarget(const UnitVector& hydras, const UnitVector & targets); 00023 BWAPI::Unit * newChooseTarget(BWAPI::Unit * hydra, const UnitVector & targets); 00024 00025 int HydraliskManager::sumSquaredDistance(const UnitVector & hydras, BWAPI::Unit * target); 00026 00027 00028 double2 getFleeVector(const std::vector<GroundThreat> & threats, BWAPI::Unit * hydralisk); 00029 00030 void fillGroundThreats(std::vector<GroundThreat> & threats, BWAPI::Position pos); 00031 void executeHydraliskDance(const UnitVector & hydralisks, BWAPI::Unit * target, const UnitVector & targets) ; 00032 BWAPI::Position HydraliskManager::calcFleePosition(BWAPI::Unit * hydralisk, BWAPI::Unit * target); 00033 00034 }; 00035 #endif 00036
1.7.6.1