# File karel/tk_robot_world.rb, line 388
  def read_world(filename)
    File.open(filename) do |file| file.each_line do |line|
        if line != "KarelWorld"
          key, street, avenue, other = line.split
          street, avenue, other = street.to_i, avenue.to_i, other.to_i
          if key == "beepers"
            place_beepers(street, avenue, other)
          elsif key == "eastwestwalls"
            while avenue <= other
              place_wall_north_of(street, avenue)
              avenue += 1
            end
          elsif key == "northsouthwalls"
            street, avenue = avenue, street
            while street <= other
              place_wall_east_of(street, avenue)
              street += 1
            end
          end
        end
      end
    end
    nil
  end