예제 #1
0
        private void CalculateCore(ILinks<ulong> links, ulong current, int stepsLeft, Counter counter)
        {
            links.Each(link =>
                       {
                           if (links.IsFullPoint(link[links.Constants.IndexPart]))
                               return links.Constants.Continue;

                           if (stepsLeft == 0)
                               counter.Count++;
                           else
                           {
                               var target = link[links.Constants.TargetPart];
                               CalculateCore(links, target, stepsLeft - 1, counter);
                           }

                           return links.Constants.Continue;
                       }, links.Constants.Any, current, links.Constants.Any);
        }