12345678910111213141516171819202122232425262728293031323334353637 |
- package pathgame.algorithm;
- import java.util.ArrayList;
- /** Class for storing one value of the Dijkstra results table
- *
- */
- public class SaleRoute {
- private ArrayList<Coord> path;
- private int totalCost;
- /** Creates a new SaleRoute with the given parameters
- *
- * @param path the list of coordinates making up this path
- * @param totalCost the total cost of this path
- */
- SaleRoute(ArrayList<Coord> path, int totalCost) {
- this.path = path;
- this.totalCost = totalCost;
- }
- /** Returns a list of coordinates making up this path
- *
- * @return a list of coordinates making up this path
- */
- public ArrayList<Coord> getPath() {
- return path;
- }
- /** Returns the total cost of this path
- *
- * @return the total cost of this path
- */
- public int getTotalCost() {
- return totalCost;
- }
- }
|