class Mastermind::Player::Computer
Public Instance Methods
get_code(length:)
click to toggle source
# File lib/mastermind/player/computer.rb, line 9 def get_code(length:) Game::Code.random(length) end
get_guess_for(game)
click to toggle source
# File lib/mastermind/player/computer.rb, line 4 def get_guess_for(game) @knuth = Knuth.new(game) unless @knuth && @knuth.game == game @knuth.prepare_guess end