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

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