centralize legalMoves method and deselect if piece is clicked twice