Btw, I see we have the above block of code three times now in this file. Please write a `findTileForTileGID` function to avoid this duplication.