Class GridNode


  • public class GridNode
    extends Node
    • Constructor Detail

      • GridNode

        public GridNode​(float x,
                        float y,
                        float grid_space)
    • Method Detail

      • calculateG

        protected float calculateG​(Node neighbor)
        Description copied from class: Node
        Calculates the distance to a neighbor node. This method is used to optimize the algorithm.
        Overrides:
        calculateG in class Node
        Returns:
        the distance to neighbor
      • calculateH

        protected float calculateH​(Node neighbor)
        Description copied from class: Node
        Calculates the distance to the goal node. This method is used to optimize the algorithm.
        Overrides:
        calculateH in class Node
        Returns:
        the distance to goal