Fixed the touch events to select the correct square on the game grid.