#include "stdafx.h"
#include "../Layer2Managers.h"
#include "L2Move.h"

void L2Move::onUnitAddedToGroup(void*, BWAPI::Unit* unit)
{
  unused(unit);
  // TODO
}

void L2Move::onUnitRemovedFromGroup(BWAPI::Unit* unit)
{
  unused(unit);
  // TODO
}

void L2Move::onStartImplementation()
{
  L2GroupTacticalAction::onStartImplementation();
  for(PersistentUnitGroup::const_iterator it = getGroup()->begin();it!=getGroup()->end();it++){
    (*it)->move(m_destination->getCurrentCenter());  //Location should have a getCenter() for now
  }
}

void L2Move::onCancelImplementation()
{
  L2GroupTacticalAction::onCancelImplementation();
  terminate(Cancelled);
  //TODO
}

void L2Move::onEndImplementation()
{
  L2GroupTacticalAction::onEndImplementation();
  // TODO
}
