lib/game.rb in codebreaker_paratskiy-0.1.7 vs lib/game.rb in codebreaker_paratskiy-0.1.8
- old
+ new
@@ -14,10 +14,10 @@
@secret_code_for_hint = []
end
def use_hint
@hints -= 1
- secret_code_for_hint.sort_by { rand }.pop
+ secret_code_for_hint.sort_by! { rand }.pop
end
def run
@secret_code = generate_code
@secret_code_for_hint = @secret_code.clone