Tiled map algorithm complete