function* expandSpan(xStart, xLen, yStart, yLen) {
const xEnd = xStart + xLen;
const yEnd = yStart + yLen;
for (let x = xStart; x < xEnd; ++x) {
for (let y = yStart; y < yEnd; ++y) {
yield {x, y};
}
}
}
//this is code from my mario game I dont think this code is functional