-
Notifications
You must be signed in to change notification settings - Fork 1
/
IAstarNode.cs
30 lines (25 loc) · 1.07 KB
/
IAstarNode.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Collections.Generic;
public interface IAstarNode<T>
{
/// <summary>
/// This function should return a dictionary of all accessible neighbor nodes, with their associated distances.
/// </summary>
/// <param name="tweak">An optional parameter to tweak the output</param>
/// <returns></returns>
Tuple<T,int>[] GetNeighborsAstarDistance(float tweak);
/// <summary>
/// This should return the A* heuristic for a tile. The heuristic is the estimated minimum distance from the tile to the destination. A* will provide the shortest path if the heuristic is minimal, but will provide a solution faster with a higher heuristic.
/// </summary>
/// <param name="dest">The destination</param>
/// <param name="tweak">An optional parameter to tweak the output</param>
/// <returns></returns>
int GetAstarHeuristic(T dest, float tweak);
/// <summary>
/// The index of the tile
/// </summary>
int AStarIndex { get; }
/// <summary>
/// The maxindex of the tile
/// </summary>
int MaxAStarIndex { get; }
}