Class: Codebreaker::MatrixGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/codebreaker/matrix.rb

Instance Method Summary collapse

Constructor Details

#initialize(input, secret_code) ⇒ MatrixGenerator

Returns a new instance of MatrixGenerator.



5
6
7
8
# File 'lib/codebreaker/matrix.rb', line 5

def initialize(input, secret_code)
  @input = input
  @secret_code = secret_code
end

Instance Method Details

#callObject



10
11
12
13
# File 'lib/codebreaker/matrix.rb', line 10

def call
  input, text_code, extra_char = check_in_same_position(@input)
  check_in_different_position(input, text_code, extra_char)
end