BuildThis.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. struct HeroPtr;
  14. class AIGateway;
  15. class FuzzyHelper;
  16. namespace Goals
  17. {
  18. class DLL_EXPORT BuildThis : public ElementarGoal<BuildThis>
  19. {
  20. public:
  21. BuildingInfo buildingInfo;
  22. TownDevelopmentInfo townInfo;
  23. BuildThis() //should be private, but unit test uses it
  24. : ElementarGoal(Goals::BUILD_STRUCTURE)
  25. {
  26. }
  27. BuildThis(const BuildingInfo & buildingInfo, const TownDevelopmentInfo & townInfo) //should be private, but unit test uses it
  28. : ElementarGoal(Goals::BUILD_STRUCTURE), buildingInfo(buildingInfo), townInfo(townInfo)
  29. {
  30. bid = buildingInfo.id;
  31. town = townInfo.town;
  32. }
  33. BuildThis(BuildingID Bid, const CGTownInstance * tid);
  34. virtual bool operator==(const BuildThis & other) const override;
  35. virtual std::string toString() const override;
  36. void accept(AIGateway * ai) override;
  37. };
  38. }