#pragma once
#include "../UnitRecord/UnitRecord.h"

class PerceptualState;

class Reasoning : public Component
{
public:
  Reasoning();

  ~Reasoning();

protected:
  friend class PerceptualState;

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

  void onUnitEvade(void*, BWAPI::Unit* unit) const;

  void onUnitRecordRemovedFromMap(void*, UnitRecord* unitRecord, BWAPI::UnitType previousType, BWAPI::Player* previousPlayer) const;

  EVENT_HANDLER1(Reasoning, onUnitEvade, BWAPI::Unit*) m_unitEvadeEventHandler;
  Event<boost::tuple<BWAPI::Unit*>>::SubscriberID m_unitEvadeID;
  EVENT_HANDLER3(Reasoning, onUnitRecordRemovedFromMap, UnitRecord*, BWAPI::UnitType, BWAPI::Player*) m_unitRemovedEventHandler;
  Event<boost::tuple<UnitRecord*, BWAPI::UnitType, BWAPI::Player*>>::SubscriberID m_unitRemovedID;
};
