code: function(instance, x, y, parent, cost) {
  		if (instance.nodeHash[x + "_" + y]!==undefined) {
  			return instance.nodeHash[x + "_" + y];
  		}
  		var simpleDistanceToTarget = getDistance(x, y, instance.endX, instance.endY);
  		if (parent!==null) {
  			var costSoFar = parent.costSoFar + cost;
  		} else {
  			costSoFar = simpleDistanceToTarget;
  		}
  		var node = new EasyStar.Node(parent,x,y,costSoFar,simpleDistanceToTarget);
  		instance.nodeHash[x + "_" + y] = node;
  		return node;
  	}
docs: Helpers