BWAPI
SPAR/AIModule/SparAIModule/DecisionMaking/Layer1Reactive/FSM/Actions/LoadUnit.h
Go to the documentation of this file.
00001 #pragma once
00002 #include "../LowLevelAction.h"
00003 
00004 namespace layer1
00005 {
00006   class LoadUnit : public LowLevelAction
00007   {
00008   public:
00009     LoadUnit(IBehaviorState& state)
00010       : LowLevelAction(state)
00011     {
00012     }
00013     virtual std::string getDescription() const
00014     {
00015       return "Load unit";
00016     }
00017     void setUnit(BWAPI::Unit* unit)
00018     {
00019       m_unitToLoad = unit;
00020     }
00021     virtual bool execute(BWAPI::Unit* unit) const
00022     {
00023             return unit->load(m_unitToLoad);
00024     }
00025   protected:
00026     BWAPI::Unit* m_unitToLoad;
00027   };
00028 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines