mirror of
https://github.com/lscharen/iigs-sprite-compiler.git
synced 2025-01-18 00:31:26 +00:00
26 lines
587 B
C#
26 lines
587 B
C#
namespace SpriteCompiler.AI
|
|
{
|
|
using System;
|
|
|
|
public class HeuristicSearchNode<A, S, T, C> : AbstractSearchNode<A, S, T, C>, ISearchNode<A, S, T, C>
|
|
where T : HeuristicSearchNode<A, S, T, C>
|
|
where C : IPathCost<C>, new()
|
|
{
|
|
public HeuristicSearchNode(T node, S state)
|
|
: base(node, state)
|
|
{
|
|
Heuristic = new C();
|
|
}
|
|
|
|
public C Heuristic { get; set; }
|
|
|
|
public override C EstCost
|
|
{
|
|
get
|
|
{
|
|
return PathCost.Add(Heuristic);
|
|
}
|
|
}
|
|
}
|
|
}
|