-
-
Save nickhoffman/9db58ee746f018b23412b19100e1cb34 to your computer and use it in GitHub Desktop.
Mars Rover code kata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rover | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require './rover.rb' | |
rover = Rover.new | |
7.times { rover.move } | |
rover.turn(:east) | |
3.times { rover.move } | |
rover.turn(:south) | |
2.times { rover.move } | |
rover.turn(:west) | |
rover.move | |
puts "Rover is at #{rover.coordinates} facing #{rover.direction}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment