andrewrk / andrewrk/node-astar

document impassability

オープン
#10 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
69
フォーク
18
PR マージ指標
30日以内にマージされた PR はありません

説明

Describe in the API docs how to use the options to make a node impassable.

Consider this grid:

```
┌───┐
│ A │
├───┤
│ │
├───┤
│ B │
└───┘
```

Where:
- empty cells should be impassable -- walls, mountains, lava, force-field, whatever
- the caller wants to ask for a path from cell `A` to cell `B`, which ought to be impossible

It appears this cannot be accomplished by the `distance` function, e.g. by returning `Number.POSITIVE_INFINITY` as the cost for entering an impassable node. Instead, it seems like the `neighbor` function must choose to omit nodes which should be treated as impassable.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。