Sha256: f853ee6f0b7a4d658694e1f6bf84529eb60b56114753f40760bb74376a5d36b3
Contents?: true
Size: 309 Bytes
Versions: 2
Compression:
Stored size: 309 Bytes
Contents
module Codebreaker class Hint def initialize(difficulty, secret_code) @difficulty = difficulty @hints = secret_code.sample(difficulty.hints) end def take raise Errors::NoHintsError if @hints.empty? @hints.pop end def count @hints.count end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cb-core-0.1.6 | lib/codebreaker/hint.rb |
cb-core-0.1.4 | lib/codebreaker/hint.rb |