Use Arrays to represent Grid data instead of Objects

This commit is contained in:
Tissevert 2022-07-31 16:09:59 +02:00
parent 6e62789c89
commit 7a6e815b61

View file

@ -47,11 +47,11 @@ function clear() {
}
function generate(f) {
var result = {}
var result = [];
for(var row = 0; row < grid.size; row++) {
result[row] = {};
result[row] = [];;
for(var column = 0; column < grid.size; column++) {
result[row][column] = f(row, column);
result[row].push(f(row, column));
}
}
return result;