Implement skeleton of tiling algorithm