/** * @param NodeInterface $goal * @param NodeInterface $current * @return number */ protected function getHeuristic(NodeInterface $goal, NodeInterface $current) { return abs($goal->getX() - $current->getX()) + abs($goal->getY() - $current->getY()); }
/** * @param NodeInterface $node * @return string */ protected function hash(NodeInterface $node) { return md5($node->getX() . "," . $node->getY()); }