#pragma once
#include "GroupTacticalAction.h"

class Move : public virtual GroupTacticalAction
{
public:
  Move(const Process* parent, unsigned int priority, const PersistentUnitGroup* initialGroup, Location* destination)
    : GroupTacticalAction(parent, priority, initialGroup)
    , TacticalAction(parent, priority)
    , Process(parent)
    , m_destination(*this, destination)
  {
  }

  Location* getDestination()
  {
    return m_destination;
  }

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

    out << "Move(" << getGroup()->getName() << ", " << *m_destination << ")";
  }

  const AutoPtr<Location> m_destination;
};
