Minimax version of tictactoe