lib/modules/game.rb in codebreaker_karolina-0.1.8 vs lib/modules/game.rb in codebreaker_karolina-0.1.9
- old
+ new
@@ -1,14 +1,16 @@
require_relative '../constants'
require_relative 'user'
require_relative 'difficulty'
+require 'date'
module CodebreakerKarolina
class Game
include CodebreakerConstants
attr_accessor :user, :difficulty
- attr_reader :secret_code
+ attr_reader :secret_code, :date
def start
+ @date = DateTime.now
@secret_code = generate_code.freeze
@hint = @secret_code.chars.uniq
end
def compare_code(guess)