#pragma once
#include "GroupTacticalAction.h"
#include "../../../../PerceptualState/Locations/Static/StaticLocation.h" 

class Scout : public virtual GroupTacticalAction
{
public:
  Scout(const Process* parent, unsigned int priority, const PersistentUnitGroup* initialGroup, StaticLocation* location)
    : GroupTacticalAction(parent, priority, initialGroup)
    , TacticalAction(parent, priority)
    , Process(parent)
    , m_scoutArrivedEvent(*this)
    , m_location(*this, location)
  {}

  Scout(const Process* parent, unsigned int priority, StaticLocation* location)
    : GroupTacticalAction(parent, priority)
    , TacticalAction(parent, priority)
    , Process(parent)
    , m_scoutArrivedEvent(*this)
    , m_location(*this, location)
  {}

  DECLARE_EVENT3(OnScoutArrived, Scout*, StaticLocation*, BWAPI::Unit*);
  OnScoutArrived& getScoutArrivedEvent() const { return m_scoutArrivedEvent; }

protected:
  virtual void _output(std::ostream& out) const
  {
    TacticalAction::_output(out);

    out << "Scout(" << *m_location << ")";
  }

  const AutoPtr<StaticLocation> m_location;

  EVENT(OnScoutArrived) m_scoutArrivedEvent;
};
