Module: CodebreakerDiz

Defined in:
lib/codebreaker_diz/game.rb,
lib/codebreaker_diz/config.rb,
lib/codebreaker_diz/version.rb,
lib/codebreaker_diz/resolver.rb,
lib/codebreaker_diz/errors/difficulty_error.rb,
lib/codebreaker_diz/errors/guess_format_error.rb,
lib/codebreaker_diz/errors/no_hints_left_error.rb

Defined Under Namespace

Classes: CodeResolver, Game

Constant Summary collapse

CODE_LENGTH =
4
EXACT_MATCH_SIGN =
'+'
NUMBER_MATCH_SIGN =
'-'
MIN_CODE_NUMBER =
1
MAX_CODE_NUMBER =
6
DIFFICULTIES =
{
  kid: { tries: 15, hints: 2 },
  average: { tries: 10, hints: 1 },
  hacker: { tries: 5, hints: 1 }
}.freeze
VERSION =
'0.2.9'
DifficultyError =
Class.new(StandardError)
GuessFormatError =
Class.new(StandardError)
NoHintsError =
Class.new(StandardError)