} // of IsPointReachable() /// <summary> /// Incorporates all points from given cluster to this cluster /// </summary> /// <param name="p_Cluster"></param> /// <returns>true always</returns> public virtual bool AnnexCluster(cluster p_Cluster) { MidPoint += p_Cluster.MidPoint; ListPoints.AddRange(p_Cluster.ListPoints); RAGUIDS.AddRange(p_Cluster.RAGUIDS); return(true); } // of AnnexCluster()
} // of MergeClusters() public override bool Equals(object obj) { //Check for null and compare run-time types. if (obj == null || GetType() != obj.GetType()) { return(false); } cluster p = (cluster)obj; return(Midpoint.Equals(p.Midpoint)); }
} // of AddPoint() /// <summary> /// Incorporates all points from given cluster to this cluster /// </summary> /// <param name="p_Cluster"></param> /// <returns>true always</returns> public override bool AnnexCluster(cluster p_Cluster) { base.AnnexCluster(p_Cluster); //Unit specific UnitCluster u_Cluster = (UnitCluster)p_Cluster; ListUnits.AddRange(u_Cluster.ListUnits); if (this.NearestMonsterDistance > u_Cluster.NearestMonsterDistance) { this.NearestMonsterDistance = u_Cluster.NearestMonsterDistance; } Info.Merge(u_Cluster.Info); return(true); } // of AnnexCluster()