andrewrk / andrewrk/node-astar

document impassability

Offen
#10 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
69
Forks
18
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.