Exemple #1
0
        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();
        }
Exemple #2
0
 public bool IsNeighbor(GridUnit gu)
 {
     return(NeighborKeys.Contains(gu.Key));
 }