getPath

getPath

> 函数列表

返回两个格子 start 和 end 之间避开障碍物的最短路径(如果存在),并忽略数组 ignoredCells 中的格子。

起点格子 start 永远不在结果路径中。当且仅当格子 end 为空时,它才在结果路径中。

如果两个格子之间不存在路径,getPath 返回 null。

注意,getPath(start, end) != getPath(end, start) 是有可能的。

参数
返回值
示例
另请参阅