Mars Rover solution in Ruby