Esempio n. 1
0
        public void RunBall(int depth)
        {
            var root = _treeNode;

            _treeNode.BuildTree(root, depth);

            var listOfLeafNodeNames = _treeNode.ListOfLeafNodeNames;
            var listOfReceivedBallsContainerNames = new List <string>();

            for (var i = 1; i <= _treeNode.NumberOfBallsToRun; i++)
            {
                var leafNodeContainerName = root.GetLeafNodeContainerName(root);

                listOfReceivedBallsContainerNames.Add(leafNodeContainerName);

                _treeNode.AssignNodeValue(root, leafNodeContainerName, i);

                _logger.Log("Container Name: " + leafNodeContainerName + ", Value: " + i);
            }

            ActualContainerName = listOfLeafNodeNames.Except(listOfReceivedBallsContainerNames).FirstOrDefault();
        }