Modify function selectSquare to catch illegal selection of opponent's piece, and to capture the location of the player's currently selected piece.