Calculate all the number of ways to play tic tac toe.