Skip to content

Commit

Permalink
Refactor: Move method/Parallel Change - removed obsolete code.
Browse files Browse the repository at this point in the history
  • Loading branch information
hemalvarambhia committed Oct 25, 2023
1 parent 0afa32e commit 148d503
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/mars_rover.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ def turn_left
end

def move_backwards
case @direction
when 'N'
Coordinates.new(x: @current_position.x, y: @current_position.y - 1)
when 'E'
Coordinates.new(x: @current_position.x - 1, y: @current_position.y)
when 'S'
Coordinates.new(x: @current_position.x, y: @current_position.y + 1)
when 'W'
Coordinates.new(x: @current_position.x + 1, y: @current_position.y)
end
@map.next_coordinate_backwards(current_position: @current_position, direction: @direction)
end

Expand Down

0 comments on commit 148d503

Please sign in to comment.