Ejemplo n.º 1
0
        public void Develop(Root plantPart, SimulationStateSnapshot snapshot)
        {
            var descriptor = plantDescriptorService.Describe(plantPart, false);

            if (ShouldGrow(plantPart, descriptor, snapshot))
            {
                CellIterator.IterateCells(plantPart.Cells, cell => cellGrower.GrowRootCell(cell, plantPart, snapshot));
            }

            if (ShouldAddLateralRoot(plantPart, descriptor, snapshot))
            {
                var newRoot = CreateNewRoot(descriptor, plantPart);

                plantPart.ConnectRoot(newRoot);
            }
        }