A* PathFinder for Flash
The A* can be summarized as:
setup the openlist
setup the closedlist
push the starting node to the open list
while the openlist is not empty
Look for the lowest 'f' cost node on the open list and
pop from the openlist and name it 'current'
if the current node is the goal then exit loop
for each of the node adjacent to the current node
set the parent of this adjacent to 'current'
if a node with the same position as the adjacent /
node is in the open list and its 'f' is lower than /
the node adjacent
then skip current adjacent node
if a node with the same position is in closedlist /
and its 'f' is lower
then skip current adjacent node
otherwise push the current node to the open list
remove occurences of adjacent node from /
OPEN and CLOSED list
Add adjacent node to the OPEN list
end for
add the current node to the closed list
end while
Read the article on my wiki
