Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         recursiveIterationOfPoints: function(path, end) {
  2.             let current = path[path.length - 1];
  3.             console.log(current);
  4.  
  5.             if (current.id === end.id) {
  6.                 return path;
  7.             }
  8.  
  9.             // Otherwise run run other ercursive iterations for the connected.
  10.             for (let i = 0; i < current.connected.length; i++) {
  11.                 let newPath = path;
  12.                 newPath.push(hallwayPoints[current.connected[i]]);
  13.  
  14.                 path = this.recursiveIterationOfPoints(newPath, end);
  15.             }
  16.         },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement