Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- recursiveIterationOfPoints: function(path, end) {
- let current = path[path.length - 1];
- console.log(current);
- if (current.id === end.id) {
- return path;
- }
- // Otherwise run run other ercursive iterations for the connected.
- for (let i = 0; i < current.connected.length; i++) {
- let newPath = path;
- newPath.push(hallwayPoints[current.connected[i]]);
- path = this.recursiveIterationOfPoints(newPath, end);
- }
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement