Algorithm produces correct shapes

Had to prevent ground blocks to skip corners
There are just some doubled lines left