lib/codebreaker/codebreaker.rb in codebreaker-engine-0.1.2 vs lib/codebreaker/codebreaker.rb in codebreaker-engine-0.1.3

- old
+ new

@@ -1,10 +1,10 @@ class CodeBreaker extend CodebreakerApi include Validation - attr_reader :attempts + attr_reader :attempts, :name, :difficulty, :hints LEVEL = { easy: { attempts: 15, hints: 2, difficulty: :easy }, middle: { attempts: 10, @@ -13,10 +13,10 @@ hell: { attempts: 5, hints: 1, difficulty: :hell } }.freeze def self.stats - CodeBreaker.stats_base || [] + CodeBreaker.load || [] end def initialize(name, chose_level) @codemaker = CodeMaker.new @attempts = LEVEL.dig(chose_level, :attempts)