BWAPI
|
00001 #pragma once 00002 #include "Micro/Goals/Goal.h" 00003 00004 // #define __MID_SUBGOALS__ 00005 00006 /*** 00007 * A helper/wrapper on top of Goal to facilitate simple attacks (pushs) 00008 * With abort() if our force ratio is < 0.75 00009 */ 00010 class AttackGoal: public Goal 00011 { 00012 private: 00013 #ifdef __MID_SUBGOALS__ 00014 void createMidSubgoal(); 00015 #endif 00016 public: 00017 AttackGoal(const std::map<BWAPI::UnitType, int>& miniUnits, 00018 BWAPI::Position p, int priority = 50, int firstFrame = 0); 00019 AttackGoal(BWAPI::Position p, int priority = 50, int firstFrame = 0); 00020 AttackGoal(pSubgoal subgoal, int priority = 50, int firstFrame = 0); 00021 virtual ~AttackGoal(); 00022 void achieve(); 00023 std::string getName(); 00024 std::string getShortName(); 00025 void abort(); 00026 //virtual void onOffer(std::set<BWAPI::Unit*> objects); 00027 };