public World() { _random = new Random(); GridUnits = new Dictionary <Tuple <double, double>, GridUnit>(); for (var lat = 90; lat > -90; lat--) { for (var lon = -180; lon < 180; lon++) { var gu = new GridUnit(lat, lon); GridUnits[gu.Key] = gu; } } foreach (var gu in GridUnits.Values) { gu.SetNeighbors(GridUnits); } CreateTectonicPlates(); SetElevation(); }
public bool IsNeighbor(GridUnit gu) { return(NeighborKeys.Contains(gu.Key)); }