Sha256: 446141d941c402f288a80278234b8b89b3e66c8ba25794331154b544d40f325e
Contents?: true
Size: 580 Bytes
Versions: 4
Compression:
Stored size: 580 Bytes
Contents
# frozen_string_literal: true require_relative 'autoload' 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
4 entries across 4 versions & 1 rubygems