working refactored bitwise tic tac toe win conditions