def transform_root(headers, ini, headers2, moves, forks)
      ret = { "header" => {}, "moves" => moves }
      headers.compact.each { |h| ret["header"][h["k"]] = h["v"] }
      headers2.compact.each { |h| ret["header"][h["k"]] = h["v"] }
      if ini
        ret["initial"] = ini
      elsif ret["header"]["手合割"]
        preset = preset2str(ret["header"]["手合割"])
        ret["initial"] = { "preset" => preset } if preset != "OTHER"
      end
      transform_root_header_data(ret) if ret["initial"] && ret["initial"]["data"]
      transform_root_forks(forks, moves)
      ret
    end
def transform_root(headers, ini, headers2, moves, forks)
      ret = { "header" => {}, "moves" => moves }
      headers.compact.each { |h| ret["header"][h["k"]] = h["v"] }
      headers2.compact.each { |h| ret["header"][h["k"]] = h["v"] }
      if ini
        ret["initial"] = ini
      elsif ret["header"]["手合割"]
        preset = preset2str(ret["header"]["手合割"])
        ret["initial"] = { "preset" => preset } if preset != "OTHER"
      end
      transform_root_header_data(ret) if ret["initial"] && ret["initial"]["data"]
      transform_root_forks(forks, moves)
      ret
    end
transform to jkf