heuristic function

double heuristic(
  1. Tile tile,
  2. Tile goal
)

Implementation

double heuristic(Tile tile, Tile goal) {
  final x = tile.x - goal.x;
  final y = tile.y - goal.y;
  return math.sqrt(x * x + y * y);
}