Therefore we add a getHeuristic method to the State interface:
For PuzzleState we implement heuristics like this:
public int getHeuristic(State goal) {
return tilesOutOfPlace(goal);
}
private int tilesOutOfPlace(State goal) {
...
}