using AdventOfCode.Core.Shared.Grid; namespace AdventOfCode.Core.Shared.A_Star { public class AStarNode : Point { /// /// Distance from start node /// public long GCost { get; set; } = 0; /// /// Estaimated distance to end node /// public long HCost { get; set; } /// /// Total cost (G + F) /// public long FCost => GCost + HCost; public AStarNode? ParentNode { get; set; } public AStarNode() { } public AStarNode(Point position) : base(position) { } public AStarNode(int x, int y, char value) : base(x, y, value) { } public virtual bool CanMoveTo(AStarNode target) => true; } }