예제 #1
0
        public CircularCloudLayouter(Point center, AbstractSpiralGenerator generator)
        {
            Center = center;
            var result = generator.Begin(center);

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