Beispiel #1
0
 protected virtual void OnStep(FinderEventArgs e)
 {
     _stopwatch.Stop();
     StepConfig(e.GridMap);
     e.GridMap.UpdateMaxNodes();
     Step?.Invoke(this, e);
     _stopwatch.Start();
 }
Beispiel #2
0
        protected FinderEventArgs BuildArgs(int i, IMap map, bool finded = false)
        {
            var args = new FinderEventArgs
            {
                PassedTimeInMs     = _stopwatch.ElapsedMilliseconds,
                Step               = i,
                ExpandedNodesCount = map.ClosedListCount() + map.OpenListCount(),
                Finded             = finded,
                GridMap            = map
            };

            return(args);
        }
Beispiel #3
0
 protected virtual void OnStart(FinderEventArgs e)
 {
     Start?.Invoke(this, e);
     _stopwatch.Reset();
     _stopwatch.Start();
 }
Beispiel #4
0
 protected virtual void OnEnd(FinderEventArgs e)
 {
     _stopwatch.Stop();
     End?.Invoke(this, e);
 }