public CircularCloudLayouter(Point center, AbstractSpiralGenerator generator) { Center = center; var result = generator.Begin(center); spiralGenerator = result.IsSuccess ? result.Value : throw new InvalidOperationException(result.Error); }
public CircularCloudLayouter(Point center, AbstractSpiralGenerator generator) { Center = center; spiralGenerator = generator.Begin(center); }
public static IEnumerable <Point> Take(this AbstractSpiralGenerator generator, int amount) => Enumerable.Range(0, amount) .Select(_ => generator.Next());