// Useful to sort lists by a custom key import java.util.Comparator; /// In this file you will implement your navmesh and pathfinding. /// This node representation is just a suggestion class Node { int id; ArrayList polygon; PVector center; ArrayList neighbors; ArrayList connections; } class NavMesh { void bake(Map map) { /// generate the graph you need for pathfinding } ArrayList findPath(PVector start, PVector destination) { /// implement A* to find a path ArrayList result = null; return result; } void update(float dt) { draw(); } void draw() { /// use this to draw the nav mesh graph } }