AIPathfinder.h 726 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * AIPathfinder.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 "AINodeStorage.h"
  12. #include "../AIUtility.h"
  13. #include "../VCAI.h"
  14. class AIPathfinder
  15. {
  16. private:
  17. static std::shared_ptr<AINodeStorage> storage;
  18. CPlayerSpecificInfoCallback * cb;
  19. VCAI * ai;
  20. public:
  21. AIPathfinder(CPlayerSpecificInfoCallback * cb, VCAI * ai);
  22. std::vector<AIPath> getPathInfo(const int3 & tile) const;
  23. bool isTileAccessible(const HeroPtr & hero, const int3 & tile) const;
  24. void updatePaths(std::vector<HeroPtr> heroes, bool useHeroChain = false);
  25. void init();
  26. };