Module jumper.core.node

The node class.

The node class represents a cell on a collision map. Basically, for each single cell in the collision map passed-in upon initialization, a node object would be generated and then stored within the grid object.

In the following implementation, nodes can be compared using the < operator. The comparison is made on the basis of their f cost. From a processed node, the pathfinder would expand the search to the next neighbouring node having the lowest f cost. This comparison is internally used within the open list heap to quickly sort all nodes queued inside the heap.

Info:

  • Copyright: 2012-2013
  • License: MIT
  • Author: Roland Yonaba

Functions

node:new (x, y) Inits a new node object

Tables

node Internal node Class


Functions

node:new (x, y)
Inits a new node object

Parameters:

  • x int the x-coordinate of the node on the collision map
  • y int the y-coordinate of the node on the collision map

Returns:

    node a new node object

Tables

node
Internal node Class

Fields:

  • x the x-coordinate of the node on the collision map
  • y the y-coordinate of the node on the collision map
generated by LDoc 1.3