package pathgame.algorithm; import java.util.ArrayList; /** Class that stores data on paths to nodes that are not adjacent to each other * */ public class ExtraPath { private int pathWeight; private int destX, destY; private ArrayList pathCoords; /** Creates an ExtraPath with the given parameters * * @param destX x position of the other end of the path * @param destY y position of the other end of the path * @param pathWeight total weight of the path * @param pathCoords list of all coordinates that make up the path, in order */ public ExtraPath(int destX, int destY, int pathWeight, ArrayList pathCoords) { this.destX = destX; this.destY = destY; this.pathWeight = pathWeight; this.pathCoords = pathCoords; } /** Returns x position of path destination * * @return x position of path destination */ public int getDestX() { return destX; } /** Returns y position of path destination * * @return y position of path destination */ public int getDestY() { return destY; } /** Returns total weight of the path * * @return total weight of the path */ public int getPathWeight() { return pathWeight; } /** Returns a list of the coordinates that make up the path * * @return coordinates of path */ public ArrayList getPathCoords() { return pathCoords; } }