Mars Rover Problem in Ruby