#pragma once
#include "../../../Layer2Actions/Interface/Actions/Recruit.h"
#include "Layer3Process.h"
#include "../../../../Utils/Process/ProcessContainer.h"

class ArmyComposition;
//
// Input: units composition
//

class RecruitArmyProcess : public Layer3Process
{
public:
  RecruitArmyProcess(const Process* parent)
    : Layer3Process(parent, Scheduler::SCHEDULING_MEDIUM_PRIORITY, 10, 3)
    , m_infiniteRecruit(*this)
  {
  }

  virtual void run();

  void onNewTargetArmyComposition(const ArmyComposition& targetArmyComposition)
  {
    unused(targetArmyComposition);

    // Stuff will be updated during the next start()
  }

protected:
  virtual void _output(std::ostream& out) const
  {
    out << "Recruit army";
  }

  ProcessContainer<Recruit> m_infiniteRecruit;
  std::map<BWAPI::UnitType, ProcessContainerList<Recruit>> m_finiteRecruits;
};
