summaryrefslogtreecommitdiff
path: root/game/network/routeWalker.h
blob: d70103f5fdd887409c65153260df254e9371a29b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef ROUTEWALKER_H
#define ROUTEWALKER_H

#include "link.h"
#include <set>

class RouteWalker {
public:
	using Solution = Link::Nexts;

	RouteWalker();

	Solution findRouteTo(const Link::End & currentEnd, const NodePtr & dest);

private:
	void findRouteTo(const Link::End & currentEnd, const NodePtr & dest, float length);

	std::set<const Link::End *> visited;
	Solution bestSolution, currentSolution;
	float solutionLength;
};

#endif