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

class FollowUnitCommand : public Command
{
public:
  FollowUnitCommand(BehaviorState& state, BWAPI::Unit* unitToFollow)
    : Command(state)
    , m_unitToFollow(unitToFollow)
  {
  }
  virtual bool execute(BWAPI::Unit* unit) const
  {
    return unit->follow(m_unitToFollow);
  }
protected:
  virtual void _output(std::ostream& out) const
  {
    out << "Follow-Unit " << *m_unitToFollow;
  }

  BWAPI::Unit* m_unitToFollow;
};
