#pragma once
#include "Command.h"
#include "../../../../BWAPI_AddOn.h"

class LoadUnitCommand : public Command
{
public:
  LoadUnitCommand(BehaviorState& state, BWAPI::Unit* unitToLoad)
    : Command(state)
    , m_unitToLoad(unitToLoad)
  {
  }
  virtual bool execute(BWAPI::Unit* unit) const
  {
    return unit->load(m_unitToLoad);
  }
protected:
  virtual void _output(std::ostream& out) const
  {
    out << "Load-Unit " << *m_unitToLoad;
  }

  BWAPI::Unit* const m_unitToLoad;
};
