// TODO: bug: if you call this before you call region(), something goes wrong :( public List <PointF> NeighborSitesForSite(PointF coord) { List <PointF> PointFs = new List <PointF>(); Site site = _sitesIndexedByLocation[coord]; if (site == null) { return(PointFs); } List <Site> sites = site.NeighborSites(); foreach (Site neighbor in sites) { PointFs.Add(neighbor.Coord()); } return(PointFs); }
public List <uint> ListNeighborSitesIDsForSite(Vector2 coord) { List <uint> list = new List <uint>(); Site site = _sitesIndexedByLocation[coord]; if (site == null) { return(list); } List <Site> list2 = site.NeighborSites(); for (int i = 0; i < list2.Count; i++) { list.Add(list2[i].color); } return(list); }
public HashSet <uint> NeighborSitesIDsForSite(Vector2 coord) { HashSet <uint> hashSet = new HashSet <uint>(); Site site = _sitesIndexedByLocation[coord]; if (site == null) { return(hashSet); } List <Site> list = site.NeighborSites(); for (int i = 0; i < list.Count; i++) { hashSet.Add(list[i].color); } return(hashSet); }
// TODO: bug: if you call this before you call region(), something goes wrong :( public List <Vector2> NeighborSitesForSite(Vector2 coord) { List <Vector2> Vector2s = new List <Vector2>(); Site site = _sitesIndexedByLocation[coord]; if (site == null) { return(Vector2s); } List <Site> sites = site.NeighborSites(); foreach (Site neighbor in sites) { Vector2s.Add(neighbor.Coord()); } return(Vector2s); }
public List <Vector2> NeighborSitesForSite(Vector2 coord) { List <Vector2> list = new List <Vector2>(); Site site = _sitesIndexedByLocation[coord]; if (site == null) { return(list); } List <Site> list2 = site.NeighborSites(); for (int i = 0; i < list2.Count; i++) { Site site2 = list2[i]; list.Add(site2.Coord); } return(list); }
// TODO: bug: if you call this before you call region(), something goes wrong :( public List <Vector2> NeighborSitesForSite(Vector2 coord) { List <Vector2> points = new List <Vector2> (); Site site = _sitesIndexedByLocation [coord]; if (site == null) { return(points); } List <Site> sites = site.NeighborSites(); Site neighbor; for (int nIndex = 0; nIndex < sites.Count; nIndex++) { neighbor = sites [nIndex]; points.Add(neighbor.Coord); } return(points); }