How do I compare three Boolean values when the comparisons are long? : I am trying to set up a condition check for my code. However, the code has become long and complex. I need a simpler version of the code that can easily do the job. 

I have tried to compare three boolean values separated by brackets such that I only compare two values. 

    if ((((userState[0][0]&&userState[0][1])&&(userState[0][2])))||(((userState[1][0]&&userState[1][1])&&(userState[1][2])))||(((userState[2][0]&&userState[2][1])&&(userState[2][2])))||(((userState[0][0]&&userState[1][0])&&(userState[2][0])))||(((userState[0][1]&&userState[2][1])&&(userState[1][1])))||(((userState[0][2]&&userState[2][2])&&(userState[1][2])))||(((userState[0][0]&&userState[2][2])&&(userState[1][1])))||(((userState[1][2]&&userState[1][1])&&(userState[2][0]))))