public void CreateGraph() { foreach (String i in Segments.Actions) { if (value.numberOfMove < 3) { Node newNode = new Node(); newNode.value = value.Copy(); newNode.value.Move(i); nexts.Add(newNode); newNode.last = this; newNode.CreateGraph(); } } }