iterate over tiles and add event listener for click