Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Output current position when user inputs report command
  • Loading branch information
SelenaSmall committed Aug 26, 2017
1 parent fa0d47d commit 133c780
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/handle_input.rb
Expand Up @@ -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.