Exemplo n.º 1
0
 public void OnEnter(ITree <JumpNode> node, ITreeSearchContinuation treeSearchContinuation)
 {
     VistedNodesCount++;
     if (VistedNodesCount > _maxVisitedNodex)
     {
         treeSearchContinuation.Stop();
     }
 }
Exemplo n.º 2
0
 public override void OnEnter(ITree <int> node, ITreeSearchContinuation treeSearchContinuation)
 {
     base.OnEnter(node, treeSearchContinuation);
     if (node.Node == STOP_ON_THIS)
     {
         treeSearchContinuation.Stop();
     }
     if (node.Node == DONT_ENTER_CHILDREN)
     {
         treeSearchContinuation.DontEnterChildren();
     }
 }
Exemplo n.º 3
0
 public void OnEnter(ITree <int> node, ITreeSearchContinuation treeSearchContinuation)
 {
     if (ShouldStop(node.Node))
     {
         treeSearchContinuation.Stop();
     }
     if (ShouldNotEnterChildren(node.Node))
     {
         treeSearchContinuation.DontEnterChildren();
     }
     _nested.Add(node.Node);
 }
Exemplo n.º 4
0
 private void MaxValueUpdated(int actualValue, ITreeSearchContinuation treeSearchContinuation, ITree <JumpNode> node)
 {
     if (actualValue <= CurrentMaxValue)
     {
         return;
     }
     if (actualValue == _targetBorder.WinValue)
     {
         treeSearchContinuation.Stop();
     }
     ResultMove      = new CompositeMove(_acutalMoves.ToArray().Reverse());
     CurrentMaxValue = actualValue;
     CurrentMaxNode  = node.Node;
     MaxUpdated();
 }