Пример #1
0
 public Node(Node parent, ISuccessor successor)
 {
     State          = successor.State;
     Parent         = parent;
     Successor      = successor;
     Cost           = parent.Cost + successor.Cost;
     Depth          = parent.Depth + 1;
     Path           = false;
     Children       = new List <Node>();
     _stateComparer = new StateComparer();
 }
Пример #2
0
 public Node(IState state)
 {
     State          = state;
     Parent         = null;
     Successor      = null;
     Cost           = 0;
     Depth          = 0;
     Path           = false;
     Children       = new List <Node>();
     _stateComparer = new StateComparer();
 }