private void f(AStarGoal<N> goal, N node, N neighbour) {
    float g = node.g + goal.g(node, neighbour); // estimate the cost from
    // the start additively
    float h = goal.h(neighbour);

    neighbour.f = g + h;
    neighbour.g = g;
    neighbour.h = h;
  }