lib/game.rb
# start the game with infinite loop until 'exit' command
start the game with infinite loop until 'exit' command
start the game with infinite loop until ' exit ' command
def start
      if @input_source==STDIN
        puts "Enter commands: (type \"exit\" to quit; \"option\" for help)"
      end
      command = @input_source.gets.chomp
      while command and (command.chomp.downcase !="exit")
        command.chomp!
        process command if !command.empty?
        command = @input_source.gets
      end
    end
def start if @input_source == STDIN puts "Enter commands: (type \"exit\" to quit; \"option\" for help)" end command = @input_source . gets . chomp while command and ( command . chomp . downcase != "exit" ) command . chomp! process command if ! command . empty? command = @input_source . gets end end
start the game with infinite loop until 'exit' command
start the game with infinite loop until ' exit ' command