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

class AttackUnitCommand : public Command
{
public:
  AttackUnitCommand(BehaviorState& state, BWAPI::Unit* target)
    : Command(state)
    , m_target(target)
  {
  }
  virtual bool execute(BWAPI::Unit* unit) const
  {
    return unit->attack(m_target);
  }
protected:
  virtual void _output(std::ostream& out) const
  {
    out << "Attack-Unit " << *m_target;
  }

  BWAPI::Unit* const m_target;
};
