Sha256: 661e3c794ac1dbf37c6cc8c84f3045eb487e0f976ee8bc8d43f911dc7d05282c
Contents?: true
Size: 309 Bytes
Versions: 1
Compression:
Stored size: 309 Bytes
Contents
module Codebreaker module Validation VALID_DIFFICULTS = %w[easy medium hell] def name_valid?(name) name.length.between? 3, 20 end def guess_valid?(guess) /^[1-6]{4}$/.match? guess end def difficult_valid?(level) VALID_DIFFICULTS.include? level end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
codebreaker_dmitriev-0.2.2 | lib/codebreaker/validation.rb |