How to convert this class to Angular ?

 avatar
Biezdar
javascript
2 years ago
499 B
1
Indexable
Never
class Maze {
    
    constructor(size, rows, columns) {
    
        this.size = size;
        this.rows = rows;
        this.columns = columns;
        this.grid = [];
        this.stack = [];
    }

    setup() {
        for(let r = 0;r < this.rows; r++) {
            let row = [];
            for(let c = 0; c < this.columns; c++) {
                let cell = new Cell(r, c, this.grid, this.size);
                row.push(cell);
            }
            this.grid.push(row)
        }
    }

}