Exemplo n.º 1
0
  /*
   * SHOREST PATH FOR MIND CONTROL
   */
  private void setShortestPath() {
    powerUp = true;

    shortestPath =
        game.GameScreen.getGraphManager().shortestNoRLDijkstraPath(currentIntersection, tempTarget);
    currentRoad = 0;

    if (shortestPath == null) return;

    if (currentIntersection == shortestPath.get(currentRoad).getNode1()) {
      targetIntersection = shortestPath.get(currentRoad).getNode2();
    } else {
      targetIntersection = shortestPath.get(currentRoad).getNode1();
    }
  }