How to convert this class to Angular ?
Biezdar
javascript
3 years ago
499 B
8
Indexable
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)
}
}
}Editor is loading...