ExplorationHelper.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * ExplorationHelper.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 "../AIUtility.h"
  12. #include "../../../lib/GameConstants.h"
  13. #include "../../../lib/GameLibrary.h"
  14. #include "../Goals/AbstractGoal.h"
  15. namespace NKAI
  16. {
  17. class ExplorationHelper
  18. {
  19. private:
  20. const CGHeroInstance * hero;
  21. int sightRadius;
  22. float bestValue;
  23. Goals::TSubgoal bestGoal;
  24. int3 bestTile;
  25. int bestTilesDiscovered;
  26. const Nullkiller * ai;
  27. CCallback * cbp;
  28. const TeamState * ts;
  29. int3 ourPos;
  30. bool allowDeadEndCancellation;
  31. bool useCPathfinderAccessibility;
  32. public:
  33. ExplorationHelper(const CGHeroInstance * hero, const Nullkiller * ai, bool useCPathfinderAccessibility = false);
  34. Goals::TSubgoal makeComposition() const;
  35. bool scanSector(int scanRadius);
  36. bool scanMap();
  37. int howManyTilesWillBeDiscovered(const int3 & pos) const;
  38. private:
  39. void scanTile(const int3 & tile);
  40. bool hasReachableNeighbor(const int3 & pos) const;
  41. };
  42. }