Sha256: d7201962c569771aeb0ef960900ad75f09ca51d6a76cfe13159b59f723de78c9
Contents?: true
Size: 551 Bytes
Versions: 3
Compression:
Stored size: 551 Bytes
Contents
# frozen_string_literal: true module CodebreakerKirill class User include Settings attr_accessor :attempts_used, :hints_used attr_reader :difficulty, :name, :level def initialize(name, difficulty) validation(name, difficulty) @difficulty = difficulty @name = name @level = Settings::DIFFICULTY[@difficulty] @attempts_used = 0 @hints_used = 0 end def validation(name, difficulty) Validations.validate_name(name) Validations.validate_difficulty(difficulty) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
codebreaker_kirill-2.0.0 | lib/codebreaker_kirill/user.rb |
codebreaker_kirill-1.3.7 | lib/codebreaker_kirill/user.rb |
codebreaker_kirill-1.3.6 | lib/codebreaker_kirill/user.rb |