import { Hex } from "../../Util/index.js";
import { ECellType, SimTower } from "../index.js";

export class SimCell {
    private _hex: Hex;
    private _distance: number;
    private _type: ECellType;
    private _blockedType: number = -1;
    private _index: number;
    private _simTower: SimTower | null = null;
    private _pathsToTarget: number[][] = [];

    constructor(hex: Hex, distance: number, type: ECellType, index: number) {
        this._hex = hex;
        this._distance = distance;
        this._type = type;
        this._index = index;
    };

    public get hex(): Hex {
        return this._hex;
    }

    public get distance(): number {
        return this._distance;
    }

    public get type(): ECellType {
        return this._type;
    }

    public set type(value: ECellType) {
        this._type = value;
    }

    public get blockedType(): number {
        return this._blockedType;
    }

    public set blockedType(value: number) {
        this._blockedType = value;
    }

    public get index(): number {
        return this._index;
    }

    public get simTower(): SimTower | null {
        return this._simTower;
    }

    public set simTower(value: SimTower) {
        this._simTower = value;
    }

    public get pathsToTarget(): number[][] {
        return this._pathsToTarget;
    }

    public set pathsToTarget(value: number[][]) {
        this._pathsToTarget = value;
    }
}
