Updated the tile generation location algorithm