class CLI

Attributes

command[R]
input[R]
messages[R]
output[R]

Public Class Methods

new(input, output) click to toggle source
# File lib/cli.rb, line 10
def initialize(input, output)
  @input = input
  @output = output
  @messages = GamePrompts.new
  @command = ''
end

Public Instance Methods

call() click to toggle source
# File lib/cli.rb, line 17
def call
  output.puts @messages.mastermind_logo
  output.puts @messages.intro_message
  until quit?
    output.puts @messages.player_input
    @command = input.gets.strip.downcase
    welcome_options
  end
end