Skip to content

Commit

Permalink
Improved code formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
hemalvarambhia committed Oct 25, 2023
1 parent 25be252 commit f9ea32d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/mars_rover.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ def backwards

def rotate_left
Location.new(
coordinates: @current_location.coordinates, direction: TURN_LEFT[@current_location.direction]
coordinates: @current_location.coordinates,
direction: TURN_LEFT[@current_location.direction]
)
end

def rotate_right
Location.new(
coordinates: @current_location.coordinates, direction: TURN_LEFT.invert[@current_location.direction]
coordinates: @current_location.coordinates,
direction: TURN_LEFT.invert[@current_location.direction]
)
end
end

0 comments on commit f9ea32d

Please sign in to comment.