Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

heuristic function getting wrong arguments fixed

  • Loading branch information...
commit f7862cdf6c83376be6a587f54284155ee72da6e3 1 parent 8f0df57
@lukebitts authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  astar.js
View
2  astar.js
@@ -35,7 +35,7 @@ Crafty.c("AStar",{
var open = [];
var closed = [];
var g = 0;
- var h = this._heuristic(start, destination);
+ var h = this._heuristic(start.tile, destination.tile);
var f = g+h;
open.push(start);
while(open.length > 0){
Please sign in to comment.
Something went wrong with that request. Please try again.