Permalink
Browse files

Output current position when user inputs report command

  • Loading branch information...
SelenaSmall committed Aug 26, 2017
1 parent fa0d47d commit 133c78084ccc483b6c52e22c26b12ea5c5b09d9f
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/handle_input.rb
@@ -75,6 +75,9 @@ def interpret(command)
puts "New position #{robot.position.x},#{robot.position.y},#{robot.position.f}"
end
puts 'reporting' if report.match?(command)
# puts 'reporting' if report.match?(command)
if report.match?(command)
puts "Output: #{robot.position.x},#{robot.position.y},#{robot.position.f}"
end
end
end

0 comments on commit 133c780

Please sign in to comment.