diff --git a/cpp/src/pathfinder.cpp b/cpp/src/pathfinder.cpp new file mode 100644 index 0000000..ef99171 --- /dev/null +++ b/cpp/src/pathfinder.cpp @@ -0,0 +1,32 @@ +#include +#include + +#include "pathfinder.hpp" +#include "log.hpp" + +namespace pathfinder { + +void PathFinderBase::SetMap(std::shared_ptr map) +{ + m_Map = map; +} + +Path LinearPathFinder::CalculatePath(WorldPos target) +{ + auto path = Path{target}; + return path; +} + +std::unique_ptr create(PathFinderType type) { + switch (type) { + case PathFinderType::LINEAR: + return std::move(std::make_unique()); + case PathFinderType::BFS: + case PathFinderType::COUNT: + LOG_WARNING("Incorrect pathfinder type"); + return nullptr; + }; + return nullptr; +} + +} // pathfinder namespace