BuildThis.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * BuildThis.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "CGoal.h"
  12. #include "../Analyzers/BuildAnalyzer.h"
  13. namespace NKAI
  14. {
  15. struct HeroPtr;
  16. class AIGateway;
  17. class FuzzyHelper;
  18. namespace Goals
  19. {
  20. class DLL_EXPORT BuildThis : public ElementarGoal<BuildThis>
  21. {
  22. public:
  23. BuildingInfo buildingInfo;
  24. TownDevelopmentInfo townInfo;
  25. BuildThis() //should be private, but unit test uses it
  26. : ElementarGoal(Goals::BUILD_STRUCTURE)
  27. {
  28. }
  29. BuildThis(const BuildingInfo & buildingInfo, const TownDevelopmentInfo & townInfo) //should be private, but unit test uses it
  30. : ElementarGoal(Goals::BUILD_STRUCTURE), buildingInfo(buildingInfo), townInfo(townInfo)
  31. {
  32. bid = buildingInfo.id.getNum();
  33. town = townInfo.town;
  34. }
  35. BuildThis(BuildingID Bid, const CGTownInstance * tid);
  36. bool operator==(const BuildThis & other) const override;
  37. std::string toString() const override;
  38. void accept(AIGateway * ai) override;
  39. };
  40. }
  41. }