uses the a* algorithm to find a path
astar(start,end,layer,dist): return [list of positions]
- start
start position
- end
end position
- layer
a grid where zero cells are open and non-zero cells are walls
- dist
a distance function dist(a,b)
returns a list of positions from start to end