public void InitVariations(GameNode node, Variation currentVar) { List <GameNode> childrens = node.GetChidrens(); node.SetVariation(currentVar); currentVar.AddNode(node); if (childrens.Count > 0) { InitVariations(childrens[0], currentVar); for (int i = 1; i < childrens.Count; i++) { InitVariations(childrens[i], new Variation(node)); } } }