Skip to content

Instantly share code, notes, and snippets.

@nickhoffman
Created April 22, 2016 18:18
Show Gist options
  • Save nickhoffman/9db58ee746f018b23412b19100e1cb34 to your computer and use it in GitHub Desktop.
Save nickhoffman/9db58ee746f018b23412b19100e1cb34 to your computer and use it in GitHub Desktop.
Mars Rover code kata
class Rover
end
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