BWAPI
|
00001 #pragma once 00002 /* 00003 * ResourceManager.h 00004 * 00005 * This manager sends it's workers to gather gas and minerals at maximum efficiency. 00006 */ 00007 #include "Manager.h" 00008 00009 00010 class ResourceManager : public Manager 00011 { 00012 public: 00013 void update(); 00014 void draw(); 00015 00016 static bool makeAgentGatherMinerals(Agent& agent); 00017 static BWAPI::Unit* getClosestMineralPatch(const Agent& agent); 00018 00019 int getMineralRate() const; 00020 int getNumWorkersGathering() const; 00021 00022 virtual const std::string& getName() const 00023 { 00024 static const std::string name("ResourceMgr"); 00025 return name; 00026 } 00027 };