lib/chadet.rb
# Method to check how many correct characters are presented in correct positions
Method to check how many correct characters are presented in correct positions
Method to check how many correct characters are presented in correct positions
def checkCP guess
      cp = 0
      @num_of_chars.times do |i|
        if @secret_chars[i] == guess[i]
          cp += 1
        end
      end
      return cp
    end
def checkCP guess cp = 0 @num_of_chars . times do | i | if @secret_chars [ i ] == guess [ i ] cp += 1 end end return cp end
Method to check how many correct characters are presented in correct positions
Method to check how many correct characters are presented in correct positions
guess
<not_specific>