package pathgame.algorithm;

import java.util.ArrayList;

public class Node2D {
    private int weight;
    private int costSoFar = Integer.MAX_VALUE;
    private char prevOfPath = '\0';
    private boolean isQAdded = false;
    private boolean hasExtraPaths = false;
    private ArrayList<ExtraPath> extraPaths = new ArrayList<>();

    public Node2D(int weight) {
        this.weight = weight;
    }

    public int getWeight() {
        return weight;
    }

    public int getCostSoFar() {
        return costSoFar;
    }

    public char getPrevOfPath() {
        return prevOfPath;
    }

    public ArrayList<ExtraPath> getExtraPaths() {
        return extraPaths;
    }

    public boolean hasExtraPaths() {
        return hasExtraPaths;
    }

    public void setCostSoFar(int costSoFar) {
        this.costSoFar = costSoFar;
    }

    public void setPrevOfPath(char prevOfPath) {
        this.prevOfPath = prevOfPath;
    }

    public void addExtraPath(ExtraPath path) {
        hasExtraPaths = true;
        extraPaths.add(path);
    }

    public boolean isQAdded() {
        return isQAdded;
    }

    public void setQAdded(boolean QAdded) {
        isQAdded = QAdded;
    }
}
