import { returnTrue } from "../../../../core/function/returnTrue.js";
import { GridCellAction } from "../../../placement/action/GridCellAction.js";

export class GridCellActionDebugBreak extends GridCellAction {

    /**
     *
     * @type {function():boolean}
     */
    condition = returnTrue;

    static from({ condition = returnTrue }) {
        const r = new GridCellActionDebugBreak();

        r.condition = condition;

        return r;
    }

    execute(data, x, y, rotation) {
        if (this.condition(data, x, y, rotation)) {
            debugger;
        }
    }
}
