Grid::next_pos was starting its scan from the position after the current one. This is inefficient as we know how large the square we've just placed is as we scan those positions. This optimisation just skips that square when starting the scan.