Skip to content

Commit 959e0c4

Browse files
committed
Rename GraphNode to GridNode because only used in grid mode
1 parent 4c21204 commit 959e0c4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

astar.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function Graph(gridIn, diagonal) {
175175
this.grid[x] = [];
176176

177177
for (var y = 0, row = gridIn[x]; y < row.length; y++) {
178-
var node = new GraphNode(x, y, row[y]);
178+
var node = new GridNode(x, y, row[y]);
179179
this.grid[x][y] = node;
180180
this.nodes.push(node);
181181
}
@@ -261,17 +261,17 @@ Graph.prototype.toString = function() {
261261
return graphString;
262262
};
263263

264-
function GraphNode(x, y, type) {
264+
function GridNode(x, y, type) {
265265
this.x = x;
266266
this.y = y;
267267
this.type = type;
268268
}
269269

270-
GraphNode.prototype.toString = function() {
270+
GridNode.prototype.toString = function() {
271271
return "[" + this.x + " " + this.y + "]";
272272
};
273273

274-
GraphNode.prototype.isWall = function() {
274+
GridNode.prototype.isWall = function() {
275275
return this.type === 0;
276276
};
277277

0 commit comments

Comments
 (0)