Files
I150/srcs/RobotNet10/Commons/RobotNet10.GlobalPathPlanner/Model/AStarNode.cs
2026-07-03 16:37:12 +07:00

27 lines
713 B
C#

namespace RobotNet10.GlobalPathPlanner.Model;
public class AStarNode
{
public Guid Id { get; set; }
public double X { get; set; }
public double Y { get; set; }
public double Cost { get; set; }
public double Heuristic { get; set; }
public double TotalCost => Cost + Heuristic;
public string? Name { get; set; }
public AStarNode? Parent { get; set; }
public List<AStarNode> NegativeNodes { get; set; } = [];
public override bool Equals(object? obj)
{
if (obj is AStarNode other)
return Id == other.Id;
return false;
}
public override int GetHashCode()
{
return HashCode.Combine(Id);
}
}