Added functionality to click on a tile