module AStar

Overview

A* pathfinding algorithm

Extended Modules

Defined in:

a-star.cr
a-star/version.cr

Constant Summary

VERSION = "0.1.0"

Instance Method Summary

Instance Method Detail

def reconstruct_path(node) #

Reconstructs the path based on a Node (usually the goal). Returns path as an Array with start being the first element and goal last.


[View source]
def search(start : T, goal : T, &) forall T #

Runs A* search from start to goal and uses block as heuristic function. Returns Array(T) or Nil if no path was found.


[View source]