Function and test for getting tiles is written.