Class: Codebreaker::MatrixGenerator
- Inherits:
-
Object
- Object
- Codebreaker::MatrixGenerator
- Defined in:
- lib/codebreaker/matrix.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(input, secret_code) ⇒ MatrixGenerator
constructor
A new instance of MatrixGenerator.
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
#call ⇒ Object
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 |