示例#1
0
    public string MakeSgf(GameNode node)
    {
        string          retour;
        List <GameNode> childrens = node.GetChidrens();

        retour = node.GetValue();
        if (childrens.Count > 1)
        {
            foreach (var ch in childrens)
            {
                retour = retour + "(" + MakeSgf(ch) + ")";
            }
        }
        else if (childrens.Count == 1)
        {
            retour = retour + MakeSgf(childrens[0]);
        }
        return(retour);
    }