Package aStarLibrary

Examples of aStarLibrary.AStar


   */
  @SuppressWarnings("unchecked")
  @Override
  public void run() {
   
    AStar aStar = new AStar();
   
    aStar.nodes.addAll(this._map.getNodes());
   
    List<Node> nodes = aStar.getPath(this._from, this._to);
    List<Position> positions = this._map.nodesToPositions(nodes);
   
    this._listener.pathfindingFinished(positions);
  }
View Full Code Here


   
    if(from.getId() == to.getId())
      return result;
   
    // plan the path:
    AStar aStar = new AStar();
    aStar.nodes.addAll(this.getNodes());
   
    List<Node> nodes =
      aStar.getPath(
          ((BasePosition)from).getNode(),
          ((BasePosition)to).getNode()
      );
   
    // the a* algorithm returns the nodes in oposite order
View Full Code Here

TOP

Related Classes of aStarLibrary.AStar

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.