completed TicTacToe with minimax