boxes/js/world.mjs

13 lines
224 B
JavaScript

export const BOX_SIZE = 9;
const world = Array(BOX_SIZE).fill(0).map(_ => Array(BOX_SIZE).fill(0));
export function set_tile (x, y, tile) {
world[x][y] = tile;
}
export function get_tile (x, y) {
return world[x][y];
}