class Node
{
    public Float key;
    public Location location;
    
    public float costFromStart;
    public float costToGoal;
    public float totalCost;
    public Node parent;
    
    public Node() {
        costFromStart = 0;
        costToGoal = 0;
        totalCost = 0;
        parent = null;
    }
    public void update() {
        totalCost = costFromStart + costToGoal;
        key = new Float( totalCost );
    }
        
    public Node( Float a, Location b )
    {
        key = a;
        location = b;
    }
    public String toString() {
        return "[" + key + ";" + location + ";" + costFromStart + ";" + costToGoal + ";" + totalCost + "]";
    }
}
