private boolean reachedGoal(final TreeNode nodeBest){
  return goalArea.contains(nodeBest.getX(),nodeBest.getY());
}

private boolean reachedGoal ( final TreeNode nodeBest ) { return goalArea . contains ( nodeBest . getX ( ) , nodeBest . getY ( ) ) ; }
checks if the goal is reached .
