def transform_root_header_data(ret)
      if ret["header"]["手番"]
        ret["initial"]["data"]["color"] = "下先".include?(ret["header"]["手番"]) ? 0 : 1
        ret["header"].delete("手番")
      else
        ret["initial"]["data"]["color"] = 0
      end
      ret["initial"]["data"]["hands"] = [
        make_hand(ret["header"]["先手の持駒"] || ret["header"]["下手の持駒"]),
        make_hand(ret["header"]["後手の持駒"] || ret["header"]["上手の持駒"])
      ]
      %w(先手の持駒 下手の持駒 後手の持駒 上手の持駒).each do |key|
        ret["header"].delete(key)
      end
    end
def transform_root_header_data(ret)
      if ret["header"]["手番"]
        ret["initial"]["data"]["color"] = "下先".include?(ret["header"]["手番"]) ? 0 : 1
        ret["header"].delete("手番")
      else
        ret["initial"]["data"]["color"] = 0
      end
      ret["initial"]["data"]["hands"] = [
        make_hand(ret["header"]["先手の持駒"] || ret["header"]["下手の持駒"]),
        make_hand(ret["header"]["後手の持駒"] || ret["header"]["上手の持駒"])
      ]
      %w(先手の持駒 下手の持駒 後手の持駒 上手の持駒).each do |key|
        ret["header"].delete(key)
      end
    end
transform header-data to jkf