Computes the f-value of this node (in relation to the A* algorithm).
The f-value is the sum of the g- and h-values.