import Structure from './Structure.js'; export default { floor: (x, y, width) => { if (width <= 1) { return new Structure(x, y, [ { x: 0, y: 0, tile: "grass-lr" }]); } else { return new Structure(x, y, [ { x: 0, y: 0, tile: "grass-l", }, Array.from({ length: width - 2 }, (x, i) => ({ x: i + 1, y: 0, tile: "grass" })), { x: width - 1, y: 0, tile: "grass-r" }, ]); } }, }