private IEnumerable <ICell> CreateInfectedCells(int count) { var germ = _germFactory.CreateDefaultGerm(); for (int i = 0; i < count; i++) { yield return(_cellFactory.CreateInfectedCell(germ)); } }
public async Task ProcessMessageAsync(GermGrowthMessage message) { for (int i = 0; i < message.ReplicationMultiplier; i++) { _germReservoir.Add(_germFactory.CreateDefaultGerm()); } await Task.CompletedTask; }