import { SimCell } from "../SimCell";
import { SimMain } from "../SimMain";
import { ISimAction } from "./ISimAction";

export class SimActionFireTowers implements ISimAction {
    public execute(simMain: SimMain) {
        const level = simMain.currentLevel;
        if (!level) return;

        level.cells.forEach((simCell: SimCell) => {
            if (simCell.tower != null) {
                simCell.tower.fireIfAble(level);
            }
        });
    }
}
