1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
vcmi/AI/Nullkiller/Pathfinding/AIPathfinder.h

31 lines
726 B
C
Raw Normal View History

2021-05-15 18:22:44 +02:00
/*
* AIPathfinder.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
#include "AINodeStorage.h"
#include "../AIUtility.h"
#include "../VCAI.h"
class AIPathfinder
{
private:
2021-05-15 18:22:49 +02:00
static std::shared_ptr<AINodeStorage> storage;
2021-05-15 18:22:44 +02:00
CPlayerSpecificInfoCallback * cb;
VCAI * ai;
public:
AIPathfinder(CPlayerSpecificInfoCallback * cb, VCAI * ai);
2021-05-15 20:56:31 +02:00
std::vector<AIPath> getPathInfo(const int3 & tile) const;
2021-05-15 18:22:44 +02:00
bool isTileAccessible(const HeroPtr & hero, const int3 & tile) const;
2021-05-15 20:01:48 +02:00
void updatePaths(std::vector<HeroPtr> heroes, bool useHeroChain = false);
2021-05-15 18:22:44 +02:00
void init();
};