checking tiles for collision