Method: Pairity::CLI#decrease_chance

Defined in:
lib/pairity/cli.rb

#decrease_chance(pair) ⇒ Object



231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/pairity/cli.rb', line 231

def decrease_chance(pair)
  answer = ask "Are you sure you would like to decrease the odds of #{display_pair_names(pair)} pairing?" do |q|
    q.validate = /y|n/
  end

  if answer =~ /y/
    p1, p2 = pair
    @generator.resistance(p1, p2, 2)
    puts "#{display_pair_names(pair)} are less likely to be paired."
  end

  action_menu
end