result = []
order = create_integer(options[:order_min], options[:order_max], false)
x = options[:x].sample
- order.times{ result << single(factor(options), factor(options), x) }
+ order.times{
+ coefficient = factor(options, 'coefficient')
+ factor = factor(options)
+ result << single(coefficient, factor, x)
+ }
result.sort_by(&:length).reverse.join("")
end
end