Exemplo n.º 1
0
        public void Add(NPoint point)
        {
            if (!IsPointCloseEnough(point))
            {
                throw new ArgumentException("Point is too far away");
            }

            points.Add(point);
        }
Exemplo n.º 2
0
 public bool IsPointCloseEnough(NPoint point)
 {
     return(points.Count == 0 ||
            points.Any(p => p.GetManhattanDistance(point) <= maxDistance));
 }
Exemplo n.º 3
0
 public Constellation(NPoint point) :
     this(point.RepeatOnce())
 {
 }