public void OnEnter(ITree <JumpNode> node, ITreeSearchContinuation treeSearchContinuation) { VistedNodesCount++; if (VistedNodesCount > _maxVisitedNodex) { treeSearchContinuation.Stop(); } }
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(); } }
public void OnEnter(ITree <int> node, ITreeSearchContinuation treeSearchContinuation) { if (ShouldStop(node.Node)) { treeSearchContinuation.Stop(); } if (ShouldNotEnterChildren(node.Node)) { treeSearchContinuation.DontEnterChildren(); } _nested.Add(node.Node); }
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(); }