lib/game.rb in codebreaker_paratskiy-0.1.5 vs lib/game.rb in codebreaker_paratskiy-0.1.6

- old
+ new

@@ -3,10 +3,10 @@ class Game attr_accessor :player_name, :secret_code, :user_code, :attempts, :hints, :difficulty_name attr_reader :stats, :secret_code_for_hint def initialize(player_name, difficulty) - @stats = Statistic.stats + @stats = Statistic.stats || [] @player_name = player_name @difficulty_name = DIFFICULTIES.key(difficulty).to_s @attempts = difficulty[:attempts] @hints = difficulty[:hints] @db = DB