diff --git a/Route.js b/Route.js index b9259bf..6e38a33 100644 --- a/Route.js +++ b/Route.js @@ -71,7 +71,10 @@ class Graph { { if(this.getline(currentNode,neighbor.node)!=this.getline(currentNode,backtrace[currentNode])) { - time = time + 13; + if(this.getline(currentNode,neighbor.node) == "1.2km Skywalk" ||this.getline(currentNode,backtrace[currentNode]) == "1.2km Skywalk") + time=time+0; + else + time = time + 13; } } @@ -109,8 +112,7 @@ class Graph { console.log(result.interchange); path.unshift(backtrace[lastStep]) lastStep = backtrace[lastStep] - } - + } result.path=path; result.time=times[endNode]; @@ -345,12 +347,33 @@ for (var i = 0; i < pinkbranchline.length; i++) { g.addNode(pinkbranchline[i]); } for(var i=0; i<(pinkbranchline.length-1); i++){ - g.addEdge(pinkbranchline[i], pinkbranchline[i+1],2.27, "pinkbranch"); + g.addEdge(pinkbranchline[i], pinkbranchline[i+1],2.43, "pinkbranch"); } +//Orange +orange=require("./lines/orange.json"); +var orangeline = []; +for(var i=0; i