Skip to content

Commit 133c780

Browse files
committed
Output current position when user inputs report command
1 parent fa0d47d commit 133c780

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/handle_input.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ def interpret(command)
7575
puts "New position #{robot.position.x},#{robot.position.y},#{robot.position.f}"
7676
end
7777

78-
puts 'reporting' if report.match?(command)
78+
# puts 'reporting' if report.match?(command)
79+
if report.match?(command)
80+
puts "Output: #{robot.position.x},#{robot.position.y},#{robot.position.f}"
81+
end
7982
end
8083
end

0 commit comments

Comments
 (0)