Property definitions

a_star $ AStarPath :: defaultinit
# Result from path finding and a walkable path
class AStarPath[N]
	serialize

	# Total cost of this path
	var total_cost: Int

	# Nodes composing this path
	var nodes = new List[N]

	private var at: Int = 0

	# Step on the path and get the next node to travel
	fun step: N
	do
		assert nodes.length >= at else print "a_star::AStarPath::step failed, is at_end_of_path"

		var s = nodes[at]
		at += 1

		return s
	end

	# Peek at the next step of the path
	fun peek_step: N do return nodes[at]

	# Are we at the end of this path?
	fun at_end_of_path: Bool do return at >= nodes.length
end
lib/a_star/a_star.nit:300,1--328,3