namespace SpriteCompiler.AI { using System; public interface IHeuristicSearchNodeWithMemory : IHeuristicSearchNode where C : ICost { C F { get; set; } } public interface IHeuristicSearchNode : ISearchNode where C : ICost { } public class HeuristicSearchNode : AbstractSearchNode, IHeuristicSearchNode where T : IHeuristicSearchNode where C : ICost, 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); } } } }