lib/app/entities/game.rb in codebreaker_ruban-0.3.5 vs lib/app/entities/game.rb in codebreaker_ruban-0.3.6

- old
+ new

@@ -2,11 +2,11 @@ module CodebreakerRuban class Game include Validation attr_reader :difficulty, :attempts_total, :hints_total, :user, :secret_code, :datetime - attr_accessor :attempts_used, :hints_used, :errors + attr_accessor :attempts_used, :hints_used, :errors, :guess_code LENGTH_GUESS = 4 RANGE_SECRET_CODE = (1..6).freeze DIFFICULTY = { easy: { hints_total: 2, attempts_total: 15, difficulty: 'easy' }, @@ -23,9 +23,10 @@ @hints_total = difficulty[:hints_total] @hint = secret_code.clone.shuffle @hints_used = 0 @attempts_used = 0 @datetime = Time.now + @guess_code = nil @errors = [] end def validate_guess_input(input) clear_errors