@@ -0,0 +1,1358 @@
+package com.github.jaystgelais.jrpg.map.ai;%0A%0Aimport com.badlogic.gdx.ai.pfa.Connection;%0Aimport com.badlogic.gdx.ai.pfa.DefaultGraphPath;%0Aimport com.badlogic.gdx.ai.pfa.GraphPath;%0Aimport com.badlogic.gdx.ai.pfa.Heuristic;%0Aimport com.badlogic.gdx.ai.pfa.indexed.IndexedAStarPathFinder;%0Aimport com.badlogic.gdx.ai.pfa.indexed.IndexedGraph;%0Aimport com.github.jaystgelais.jrpg.map.TileCoordinate;%0A%0Apublic final class PathFinder %7B%0A    private final com.badlogic.gdx.ai.pfa.PathFinder%3CTileCoordinate%3E pathFinder;%0A    private final Heuristic%3CTileCoordinate%3E heuristic;%0A%0A    public PathFinder(final IndexedGraph%3CTileCoordinate%3E graph) %7B%0A        pathFinder = new IndexedAStarPathFinder%3CTileCoordinate%3E(graph);%0A        heuristic = new Heuristic%3CTileCoordinate%3E() %7B%0A%0A            @Override%0A            public float estimate(final TileCoordinate node, final TileCoordinate endNode) %7B%0A                return Math.abs(endNode.getX() - node.getX()) + Math.abs(endNode.getY() - node.getY());%0A            %7D%0A        %7D;%0A    %7D%0A%0A    public TileCoordinate getNextTarget(final TileCoordinate location, final TileCoordinate destination) %7B%0A        final GraphPath%3CConnection%3CTileCoordinate%3E%3E path = new DefaultGraphPath%3C%3E();%0A        pathFinder.searchConnectionPath(location, destination, heuristic, path);%0A%0A        return path.getCount() == 0 ? null : path.get(0).getToNode();%0A    %7D%0A%7D%0A

Implement AI path finder