lib/modules/game.rb in codebreaker_karolina-0.1.6 vs lib/modules/game.rb in codebreaker_karolina-0.1.7
- old
+ new
@@ -13,14 +13,14 @@
end
def compare_code(guess)
return unless valid_code?(guess)
- @user.used_attempts += 1
comparison_result(@secret_code.chars, guess.chars)
end
def win?(guess)
+ @user.used_attempts += 1
return true if @secret_code == guess
false
end