This commit is contained in:
2026-01-13 22:15:54 -06:00
parent 548bad0c57
commit f591fff8ac
10 changed files with 838 additions and 242 deletions

View File

@@ -2,9 +2,9 @@ function grid(w, h) {
this.width = w;
this.height = h;
// create a height×width array of empty lists
this.cells = new Array(h);
this.cells = array(h);
for (var y = 0; y < h; y++) {
this.cells[y] = new Array(w);
this.cells[y] = array(w);
for (var x = 0; x < w; x++) {
this.cells[y][x] = []; // each cell holds its own list
}